UNPKG

@fluentui/react-northstar

Version:
42 lines (41 loc) 1.69 kB
import { ComponentSlotStylesPrepared } from '@fluentui/styles'; import * as React from 'react'; import { UIComponentProps, ChildrenComponentProps } from '../../utils'; declare type ChildrenFunction = (params: { styles: ComponentSlotStylesPrepared; classes: string; }) => React.ReactElement; export declare type FlexItemChildren = React.ReactElement | ChildrenFunction; export interface FlexItemProps extends UIComponentProps, ChildrenComponentProps<FlexItemChildren> { /** Controls item's alignment. */ align?: 'auto' | 'start' | 'end' | 'center' | 'baseline' | 'stretch'; /** Defines size of the item. */ size?: 'size.half' | 'size.quarter' | 'size.small' | 'size.medium' | 'size.large' | string; /** * Item can fill remaining space of the container. * If numeric value is provided, remaining space will be distributed proportionally between all the items. * */ grow?: boolean | number; /** * Controls item's ability to shrink. * */ shrink?: boolean | number; /** * Item can be pushed towards opposite side in the container's direction. */ push?: boolean; /** * IGNORE (will be refactored and not exposed via API). * Value is automatically set by parent Flex component. */ flexDirection?: 'row' | 'column'; } export declare type FlexItemStylesProps = Pick<FlexItemProps, 'align' | 'grow' | 'flexDirection' | 'push' | 'shrink' | 'size'>; export declare const flexItemClassName = "ui-flex__item"; /** * A FlexItem is a layout component that customizes alignment of Flex child. */ export declare const FlexItem: React.FC<FlexItemProps> & { __isFlexItem: boolean; }; export {};