@atlrdsgn/kit
Version:
An ever–expanding library of React components, primitives, and tools
22 lines • 1.39 kB
TypeScript
import { DivProps } from '../rect';
import { ReactNodeNoStrings } from '../@utils/utils';
import { OptionalResponsiveObject, OptionalResponsiveValue } from '../../lib';
import * as React from 'react';
export type Direction = 'horizontal' | 'vertical';
export type Wrap = 1 | 0;
export declare const directionToFlexDirection: (direction: OptionalResponsiveValue<Direction> | undefined) => "row" | "column" | Partial<Record<string, "row" | "column">> | undefined;
export declare const wrapToFlexWrap: (wrap: OptionalResponsiveObject<true | false> | undefined) => "nowrap" | "wrap" | Partial<Record<string, "nowrap" | "wrap">> | undefined;
/** ------------------------------------------- */
export declare const validStackComponents: readonly ["a", "article", "div", "form", "header", "label", "li", "main", "section", "span"];
export type StackProps = {
as?: (typeof validStackComponents)[number];
align?: DivProps['alignItems'];
children: ReactNodeNoStrings;
direction?: OptionalResponsiveValue<Direction>;
flex?: DivProps['flex'];
justify?: DivProps['justifyContent'];
space?: DivProps['gap'];
wrap?: OptionalResponsiveObject<true | false>;
};
export declare const Stack: ({ as, align, children, justify, flex, direction, space, wrap, }: React.PropsWithChildren<StackProps>) => import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=stack.d.ts.map