import React from 'react'; import { Props } from '../../../common'; import { CellSize, GutterSize, HorizontalAlignment, VerticalAlignment } from './style'; import { CellDisplayType, ICellProps } from './subcomponents/Cell'; interface ICellSizeDefinition { min?: CellSize; tablet?: CellSize; desktop?: CellSize; bigDesktop?: CellSize; } interface ICellOffsetDefinition { min?: number; tablet?: number; desktop?: number; bigDesktop?: number; } interface IGutterSizeDefinition { min?: GutterSize; tablet?: GutterSize; desktop?: GutterSize; bigDesktop?: GutterSize; } interface IHorizontalAlignmentDefinition { min?: HorizontalAlignment; tablet?: HorizontalAlignment; desktop?: HorizontalAlignment; bigDesktop?: HorizontalAlignment; } interface IVerticalAlignmentDefinition { min?: VerticalAlignment; tablet?: VerticalAlignment; desktop?: VerticalAlignment; bigDesktop?: VerticalAlignment; } interface IGridLayoutCell { /** The content to place within the cell */ content?: JSX.Element | string | null; /** The size this cell takes up within the grid */ size?: ICellSizeDefinition | CellSize; /** The display type of this cell */ displayType?: CellDisplayType; /** The content alignment in this cell when the cell is in flex display type */ flexHorizontalAlignment?: IHorizontalAlignmentDefinition | HorizontalAlignment; /** The cell offset from the edge of the grid */ offset?: ICellOffsetDefinition | number; /** Component context */ componentContext?: string; } interface IGridLayoutBaseProps { /** The horizontal alignment of the items within the grid */ horizontalAlignment?: IHorizontalAlignmentDefinition | HorizontalAlignment; /** The vertical alignment of the items within the grid */ verticalAlignment?: IVerticalAlignmentDefinition | VerticalAlignment; /** Adds gutters between cells as margin in the x direction */ gutterMarginX?: IGutterSizeDefinition | GutterSize; /** Adds gutters between cells as margin in the y direction */ gutterMarginY?: IGutterSizeDefinition | GutterSize; /** Adds gutters between cells as padding in the x direction */ gutterPaddingX?: IGutterSizeDefinition | GutterSize; /** Adds gutters between cells as padding in the y direction */ gutterPaddingY?: IGutterSizeDefinition | GutterSize; /** Determines the amount of columns within the grid */ gridColumns?: number; /** Component context */ componentContext?: string; /** The margins around the component */ margins?: Props.IMargins; } interface IGridLayoutPropsWithCells extends IGridLayoutBaseProps { /** The cell objects to place within the grid */ cells: IGridLayoutCell[]; } declare type GridChild = React.ReactElement | false | null | undefined | GridChild[]; interface IGridLayoutPropsWithChildren extends IGridLayoutBaseProps { /** The cell components to place within the grid */ children: GridChild; } declare type GridLayoutProps = IGridLayoutPropsWithCells | IGridLayoutPropsWithChildren; export declare class GridLayout extends React.PureComponent { static Cell: React.FC>; static HorizontalAlignment: typeof HorizontalAlignment; static VerticalAlignment: typeof VerticalAlignment; static defaultProps: Partial; render(): JSX.Element; private getCellForDefinition; } export { IGridLayoutCell };