@ozen-ui/kit
Version:
React component library
34 lines (33 loc) • 1.96 kB
TypeScript
import './Grid.css';
import type { ReactNode, ElementType } from 'react';
import type { ResponsiveValue } from '../../types/ResponsiveValue';
import { type PolymorphicComponentPropsWithRef } from '../../utils/polymorphicComponentWithRef';
export declare const gridColsVariant: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
export type GridColsVariant = (typeof gridColsVariant)[number];
export declare const gridGapVariant: readonly ["0", "xs", "s", "m", "l", "xl", "2xl", "3xl", "4xl", "5xl", "6xl", "7xl", "8xl"];
export type GridGapVariant = (typeof gridGapVariant)[number];
export declare const gridAlignVariant: readonly ["start", "end", "center"];
export declare const gridJustifyVariant: readonly ["start", "end", "center"];
export type GridAlignVariant = (typeof gridAlignVariant)[number];
export type GridJustifyVariant = (typeof gridJustifyVariant)[number];
export declare const cnGrid: import("@bem-react/classname").ClassNameFormatter;
export type GridBaseProps = {
/** Количество колонок в сетке */
cols?: ResponsiveValue<GridColsVariant>;
/** Отступы между элементами */
gap?: ResponsiveValue<GridGapVariant>;
/** Отступы вокруг колонки */
colGap?: ResponsiveValue<GridGapVariant>;
/** Отступы вокруг строки */
rowGap?: ResponsiveValue<GridGapVariant>;
/** Выравнивание */
align?: GridAlignVariant;
/** Пространство между элементами */
justify?: GridJustifyVariant;
/** Содержимое компонента */
children?: ReactNode;
/** Дополнительные СSS-классы */
className?: string;
};
export type GridProps<As extends ElementType = 'div'> = PolymorphicComponentPropsWithRef<GridBaseProps, As>;
export declare const Grid: import("../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<GridBaseProps, "div", "as">;