import React from 'react'; import { GlobalProps } from '@lendi-ui/commons/utils'; import type { Spacing } from '@lendi-ui/commons/utils'; type Align = 'center' | 'start' | 'end' | 'stretch'; interface BaseProps extends GlobalProps { children: React.ReactNode; className?: string; align?: Align; /** * Extra margin to include at end of the container. On horizontal and tile spacers it applies to the right. On vertical spacers it applies to the bottom. */ end?: Spacing; /** * Extra margin to include at start of the container. On horizontal and tile spacers it applies to the left. On vertical spacers it applies to the top. */ start?: Spacing; /** * Should items wrap at the end of a row if they exceed the container width? */ shouldWrap?: boolean; /** * Add a width to the spacer container. Useful for nested containers. */ width?: string; minWidth?: string; maxWidth?: string; } interface Gap { gap?: Spacing; xgap?: never; ygap?: never; } interface AxisGap { xgap?: Spacing; ygap?: Spacing; gap?: never; } interface BaseAlign { align?: Align; xalign?: never; yalign?: never; } interface AxisAlign { xalign?: Align; yalign?: Align; align?: never; } type GapProps = Gap | AxisGap; type AlignProps = BaseAlign | AxisAlign; type SpacerProps = BaseProps & GapProps & AlignProps; declare module 'react' { interface CSSProperties { '--row-gap'?: string; '--column-gap'?: string; } } export declare const Spacer: ({ width, xgap, ygap, gap, className, minWidth, maxWidth, ...props }: SpacerProps) => JSX.Element; export {};