@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
28 lines (27 loc) • 1.76 kB
TypeScript
import React from 'react';
import type { SpaceProps } from '../space/Space';
import type { MediaQueryBreakpoints } from '../../shared/MediaQueryUtils';
import type { UseMediaQueries } from '../../shared/useMedia';
type Gap = false | 'xx-small' | 'x-small' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large';
export type FlexContainerProps = {
direction?: 'horizontal' | 'vertical';
wrap?: boolean;
/** Disable automatic Space wrappers for intrinsic DOM children such as `li` or `p`. */
wrapChildrenInSpace?: boolean;
rowGap?: Gap;
sizeCount?: number;
justify?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
align?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
/** For when used as a flex item in an outer container in addition to being a container: */
alignSelf?: 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch';
/** When "line-framed" is used, a line will be shown between items and above the first and below the last item */
divider?: 'space' | 'line' | 'line-framed';
/** Spacing between items inside */
gap?: Gap;
breakpoints?: MediaQueryBreakpoints;
queries?: UseMediaQueries;
};
export type FlexContainerAllProps = FlexContainerProps & SpaceProps & Omit<React.HTMLAttributes<HTMLDivElement>, 'ref' | 'wrap' | 'value' | 'label' | 'title' | 'placeholder'>;
export declare function pickFlexContainerProps<T extends FlexContainerAllProps>(props: T, defaults?: Partial<FlexContainerAllProps>, skip?: Array<keyof FlexContainerAllProps>): Omit<FlexContainerAllProps, 'children'>;
declare function FlexContainer(props: FlexContainerAllProps): import("react/jsx-runtime").JSX.Element;
export default FlexContainer;