@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
24 lines (23 loc) • 1.01 kB
TypeScript
import type { MediaQuerySizes } from '../../shared/MediaQueryUtils';
export type SpaceResponsiveContextValue = {
/**
* Forces a specific spacing density for descendants. Overrides `breakOn` when set. Use `false` to disable.
*/
density?: 'compact' | 'basis' | false;
/**
* Sets the breakpoint at which density switches from `compact` to `basis`. Default: `small`.
*/
breakOn?: Extract<MediaQuerySizes, 'small' | 'medium'>;
/**
* When `true`, disables responsive spacing for descendants, overriding a parent `Space.ResponsiveContext`. Defaults to `false`.
*/
off?: boolean;
};
/**
* Signals whether a component tree is wrapped in `Space.ResponsiveContext`.
*
* When active, `useSpacing` appends CSS classes so descendant components
* opt into responsive spacing via `--responsive-spacing-*` custom properties.
*/
declare const SpaceResponsiveContext: import("react").Context<false | SpaceResponsiveContextValue>;
export default SpaceResponsiveContext;