UNPKG

@react-md/table

Version:

Create responsive data tables and accessible fixed tables

25 lines (24 loc) 1.25 kB
import type { HTMLAttributes } from "react"; import type { TableCellConfig } from "./config"; export interface TableHeaderProps extends HTMLAttributes<HTMLTableSectionElement>, Pick<TableCellConfig, "lineWrap"> { /** * This is a rename of the `disableHover` of the `TableConfig` since table * headers are not hoverable by default. This prop can be enabled to add the * row hover color within table headers, but it is not really recommended. */ hoverable?: boolean; /** * Boolean if the header should be rendered as a sticky header that will cover * the table contents as the page or `TableContainer` is scrolled. */ sticky?: boolean; } /** * Creates a `<thead>` element with some basic styles. This component will also * update the table configuration so that all the `TableCell` children will * automatically become `<th>` elements instead of the normal `<td>` as well as * disabling the hover effect and line wrapping. The hover effect and * line-wrapping can be re-enabled if desired through the `hoverable` and * `disableNoWrap` props. */ export declare const TableHeader: import("react").ForwardRefExoticComponent<TableHeaderProps & import("react").RefAttributes<HTMLTableSectionElement>>;