import { TableCellProps } from '../table/TableCell'; import { TableRowProps } from '../table/TableRow'; import { ForwardRefExoticComponent, TableHTMLAttributes } from 'react'; export type TableCell = Omit; export type TableRow = Omit & { cells: TableCell[]; }; export type TableRowInteractive = TableRow & { onClick: () => void; }; interface Interactive { /** Renders a `` inside the `` represented by an array of row-objects */ feBody: TableRowInteractive[]; /** If true, table rows are interactive */ feInteractive?: true; } interface Static { /** Renders a `` inside the `
` represented by an array of row-objects */ feBody: TableRow[]; /** Controls wether table rows are interactive or static */ feInteractive?: false; } interface BaseProps extends TableHTMLAttributes { /** If provided, will render a caption text at the top of the table */ feCaption?: string; /** If true, will render a more compact table */ feCompact?: boolean; /** If provided, renders a `` inside `
` represented by an array of row-objects */ feFoot?: TableRow[]; /** If provided, renders a `` inside the `
` represented by an array of row-objects */ feHead?: TableRow[]; /** If true, makes the Table scrollable (occurs when content is taller than the parent's element height) */ feScrollable?: boolean; } export type TableProps = BaseProps & (Interactive | Static); /** * The `
` component renders a table to organize and display information, with data arranged in columns and rows.
* It extends the interface of native html `
` element.

* To visually highlight dynamically added rows add the `feHighlight` prop on each row item. * * See [InVision DSM](https://skf.invisionapp.com/dsm/ab-skf/4-web-applications/nav/5fa7caf78c01200018354495/folder/62b406a40ab00ac7642ad89c) for design principles.
* See [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table) for further information about the element and related attributes. */ declare const Table: ForwardRefExoticComponent; export default Table;