import { ComponentPropsWithRef, forwardRef, Ref } from 'react'; import { fontSizeLookup, fontSizeMdLookup, fontSizeLgLookup, fontWeightLookup, fontWeightMdLookup, fontWeightLgLookup, textAlignLookup, textAlignMdLookup, textAlignLgLookup, colorLookup, fontFamilyLookup, fontFamilyMdLookup, fontFamilyLgLookup, fontSizeXlLookup, fontWeightXlLookup, textAlignXlLookup, fontFamilyXlLookup, fontSize2xlLookup, fontWeight2xlLookup, colorMdLookup, colorLgLookup, colorXlLookup, } from '../theme'; import { cn } from '../libs'; import { getClassName, memo } from '../utils'; import { Responsive } from '../types/ui'; export type TextSize = keyof typeof fontSizeLookup; export type Weight = keyof typeof fontWeightLookup; export type Align = keyof typeof textAlignLookup; export type Font = keyof typeof fontFamilyLookup; export type Color = keyof typeof colorLookup; export interface TextProps extends Omit, 'color'> { size?: TextSize | Responsive; weight?: Weight | Responsive; font?: Font | Responsive; align?: Align | Responsive; truncate?: boolean | Responsive; color?: Color | Responsive; } const Component = ( { size, weight, align, truncate, color, font, className, ...rest }: TextProps, ref: Ref ) => { const s = size as any; const w = weight as any; const a = align as any; const f = font as any; const c = color as any; const t = truncate as any; return (

); }; export const Text = memo(forwardRef(Component));