UNPKG

@eccenca/gui-elements

Version:

GUI elements based on other libraries, usable in React application, written in Typescript.

27 lines (26 loc) 1.33 kB
import React from "react"; import { GridProps as CarbonGridProps } from "@carbon/react/es/components/Grid"; export interface GridProps extends Omit<CarbonGridProps<"article" | "section" | "div">, "fullWidth" | "columns" | "narrow" | "as"> { /** * The available grid height can be distributed between multiple rows. * To do so the `verticalStretched` property must be set for the `<GridRow />` element that need to be stretched. * This property can be set for multiple rows, then they share the available vertical space regarding their content. */ verticalStretchable?: boolean; /** * Use the exact space defined by the parent element. * This parent element must be displayed using a fixed, relative or absolute position. */ useAbsoluteSpace?: boolean; /** * Provide a HTML element name to render instead of the default `div`. */ as?: "article" | "section" | "div"; } /** * Layouts a grid that can contain rows and columns. * Grids can also be stacked into other grids for more complex layouts. * A very complex level of stacked grids is a sign that something should be designed differently. */ export declare const Grid: ({ children, verticalStretchable, useAbsoluteSpace, className, ...restProps }: GridProps) => React.JSX.Element; export default Grid;