UNPKG

@teamsparta/stack-text

Version:
28 lines (25 loc) 920 B
import { Responsive } from '@teamsparta/stack-core'; import { PolymorphicComponentPropsWithRef } from '@teamsparta/stack-utils'; import { ElementType, ReactElement } from 'react'; import { Font, Align } from './type.js'; import '@teamsparta/stack-font'; type TextProps<C extends ElementType> = PolymorphicComponentPropsWithRef<C, { as: C; /** * 텍스트의 폰트 스타일을 설정합니다. * - Responsive 값을 사용하여 반응형 디자인을 적용할 수 있습니다. */ font?: Responsive<Font>; /** * 텍스트의 색상을 설정합니다. * @example "#121212" || vars.brand.default */ color?: string; /** * 텍스트의 정렬 방향을 설정합니다. */ align?: Align; }>; type TextComponent = <C extends ElementType>(props: TextProps<C>) => ReactElement | null; declare const Text: TextComponent; export { Text, type TextProps };