import { getClassName, memo } from '../utils'; import { ComponentPropsWithRef, forwardRef, Ref } from 'react'; import { gapLookup, gapMdLookup, gapLgLookup, columnsLookup, columnsMdLookup, columnsLgLookup, justifyLookup, justifyMdLookup, justifyLgLookup, alignLookup, alignMdLookup, alignLgLookup, widthLookup, widthLgLookup, widthMdLookup, columnsSmLookup, gapXlLookup, columnsXlLookup, justifyXlLookup, alignXlLookup, widthXlLookup, columns2XlLookup, } from '../theme'; import { cn } from '../libs'; import { Responsive } from '../types/ui'; export type Gap = keyof typeof gapLookup; export type Columns = keyof typeof columnsLookup; export type Justify = keyof typeof justifyLookup; export type Align = keyof typeof alignLookup; export type Width = keyof typeof widthLookup; export interface GridProps extends ComponentPropsWithRef<'div'> { grow?: boolean | Responsive; gap?: Gap | Responsive; columns?: Columns | Responsive; justify?: Justify | Responsive; align?: Align | Responsive; width?: Width | Responsive; } const Component = ({ grow, gap, columns, justify, align, className, width, ...rest }: GridProps, ref: Ref) => { const g = grow as any; const gp = gap as any; const c = columns as any; const j = justify as any; const a = align as any; const w = width as any; return (
); }; export const Grid = memo(forwardRef(Component));