import { ComponentPropsWithRef, forwardRef, Ref } from 'react'; import { growLookup, growMdLookup, growLgLookup, alignSelfLookup, alignSelfMdLookup, alignSelfLgLookup, widthLookup, widthMdLookup, widthLgLookup, growXlLookup, alignSelfXlLookup, widthXlLookup, } from '../theme'; import { getClassName, memo } from '../utils'; import { cn } from '../libs'; import { Responsive } from '../types/ui'; export type Grow = keyof typeof growLookup; export type AlignSelf = keyof typeof alignSelfLookup; export type Width = keyof typeof widthLookup; export interface FlexItemProps extends ComponentPropsWithRef<'div'> { hide?: boolean | Responsive; grow?: Grow | Responsive; width?: Width | Responsive; alignSelf?: AlignSelf | Responsive; } const Component = ({ hide, grow, alignSelf, width, className, ...rest }: FlexItemProps, ref: Ref) => { const h = hide as any; const g = grow as any; const as = alignSelf as any; const w = width as any; return (
); }; export const FlexItem = memo(forwardRef(Component));