import { HTMLAttributes, ReactNode } from 'react'; declare type BaseElement = HTMLDivElement; declare type BaseProps = HTMLAttributes; /** * Transform the array of widths to an appropriate grid-template-columns * string, taking into account select/menu columns. * * Example: * [34, 78] */ export declare const useGridTemplateColumns: () => { gridTemplateColumns: string; }; /** * Table * * Defined by the number of columns. */ export interface TableProps extends Omit { readonly children?: ReactNode; /** * `class` to be passed to the component. */ readonly className?: BaseProps['className']; /** * The initial widths for the columns of the Table. * The width will be automatically adjusted to fit the * table, so use 0 if not known, e.g. new Array(#columns).fill(0) * would be a valid starting point. */ readonly initialWidths?: ReadonlyArray; /** * Control if columns should be resizeable or not. If true, resize * handles will be available to change column width. * * For doubleclick functionality to work properly, when you have multiple elements in one cell, wrap them inside a
. * * @default false */ readonly resizableColumns?: boolean; /** * Minimum column width. * * @default DEFAULT_MIN_COLUMN_WIDTH */ readonly minColumnWidth?: number; /** * Callback which will get the (new) array of column widths * every time any width is changed. */ readonly onWidthsChange?: (widths: ReadonlyArray) => void; /** * The maximum height of the table in number of rows, * more rows will cause a scrollbar to appear. */ readonly maxHeight?: number; /** * Callback which will get checked status and row ID on selection. * The ID is undefined if the main checkbox is selected ("select all"). */ readonly onSelect?: (selected: boolean, id?: string) => void; /** * Allow for optional right-side menu content for each row. */ readonly hasMenu?: boolean; /** * Key to control scrollbar in Table. * If key changes, scrollbar will scroll to top. */ readonly scrollKey?: string; } export declare const Table: import("react").NamedExoticComponent; export {};