@navinc/base-react-components
Version:
Nav's Pattern Library
22 lines (21 loc) • 908 B
TypeScript
/// <reference types="react" />
export declare type HeaderType = {
label: string;
field: string;
align?: 'right' | 'center' | 'left';
width?: string;
};
declare type RowType = Record<string, any>;
export declare 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: ({ name, headers, rows, stickyHeader, maxHeight }: TableProps) => JSX.Element | null;
declare const _default: import("styled-components").StyledComponent<({ name, headers, rows, stickyHeader, maxHeight }: TableProps) => JSX.Element | null, import("styled-components").DefaultTheme, {}, never>;
export default _default;