@navinc/base-react-components
Version:
Nav's Pattern Library
21 lines (20 loc) • 769 B
TypeScript
/// <reference types="react" />
export type HeaderType = {
label: string;
field: string;
align?: 'right' | 'center' | 'left';
width?: string;
};
type RowType = Record<string, any>;
export type TableProps = {
/** Required for accessibility, to label the table */
name: string;
headers: HeaderType[];
rows?: RowType[];
/** Makes the table headers sticky when table height is limited. */
stickyHeader?: boolean;
/** Limits the table height. Takes a string px value. */
maxHeight?: string;
};
export declare const Table: import("styled-components").StyledComponent<({ name, headers, rows, stickyHeader, maxHeight, ...rest }: TableProps) => JSX.Element | null, import("styled-components").DefaultTheme, {}, never>;
export {};