import { type FC, type ReactElement } from 'react'; import type { GridBreakPointWiseValues, GridLayoutModel } from './config'; import { type GridLayoutRowsProp } from './utils'; /** Props for the GridLayoutViewer component */ export interface GridLayoutViewerProps { /** * Layout-model saved previously from a GridLayoutEditor. * If undefined, the elements will be rendered in some default layout. * NOTE: A remount is needed if this layoutModel needs to be changed from the outside. * - The component reads it only once on load and populates layouts for missing breakpoints, assuming `lg` as the baseline */ layoutModel: GridLayoutModel | undefined; /** * Breakpoints set on the Grid. * Needs to be aligned with `rows` and `cols` */ breakpoints: GridBreakPointWiseValues; /** * # of rows to fit into the container height at each breakpoint (unless a fixed rowHeight is preferred) * rows should be aligned with `breakpoints` prop */ rows: GridLayoutRowsProp; /** * Breakpoint-wise numColumns on the Grid. * cols should be aligned with `breakpoints` prop */ cols: GridBreakPointWiseValues; /** Child elements to be rendered as Grid items. Each element should have a unique `key` */ children?: ReactElement[]; /** * List of items that needs to have free-flowing height. * NOTE: This works just for the items which don't have any other content underneath them. * By default, all items will have fixed heights derived from the `layoutModel` prop */ autoSizeItemIDs?: string[]; /** * Add container margin to viewer and runtime * @default true */ padContent?: boolean; /** * Optional minimum row height (px) to override the built-in defaults. * Useful when grid items contain content that requires more vertical space * than the default minimum (e.g. compact SimpleValue insights). */ minRowHeight?: number; } /** * Viewer component for a Grid created using GridLayoutEditor * @component */ declare const GridLayoutViewer: FC; export default GridLayoutViewer; //# sourceMappingURL=GridLayoutViewer.d.ts.map