react-lightning-design-system
Version:
Salesforce Lightning Design System components built with React
82 lines (81 loc) • 1.6 kB
TypeScript
import { ThHTMLAttributes, HTMLAttributes, TableHTMLAttributes, TdHTMLAttributes, FC, ReactNode } from 'react';
/**
*
*/
export type TableHeaderProps = {
hasActions?: boolean;
actionsPosition?: number;
sortable?: boolean;
children?: ReactNode;
};
/**
*
*/
export declare const TableHeader: FC<TableHeaderProps>;
/**
*
*/
export declare const TableBody: FC<{
children?: ReactNode;
}>;
/**
*
*/
export type TableRowProps = {
selected?: boolean;
style?: object;
} & HTMLAttributes<HTMLTableRowElement>;
/**
*
*/
export declare const TableRow: FC<TableRowProps>;
/**
*
*/
export type TableHeaderColumnProps = {
className?: string;
width?: string | number;
sortable?: boolean;
resizable?: boolean;
sortDir?: string;
sorted?: boolean;
align?: 'left' | 'center' | 'right';
onSort?: () => void;
} & ThHTMLAttributes<HTMLTableCellElement>;
/**
*
*/
export declare const TableHeaderColumn: FC<TableHeaderColumnProps>;
/**
*
*/
export type TableRowColumnProps = {
width?: string | number;
truncate?: boolean;
} & TdHTMLAttributes<HTMLTableCellElement>;
/**
*
*/
export declare const TableRowColumn: FC<TableRowColumnProps>;
/**
*
*/
export declare const TableRowColumnActions: FC<{
children?: ReactNode;
}>;
/**
*
*/
export type TableProps = {
bordered?: boolean;
verticalBorders?: boolean;
noRowHover?: boolean;
striped?: boolean;
fixedLayout?: boolean;
sortable?: boolean;
autoWidth?: boolean;
} & TableHTMLAttributes<HTMLTableElement>;
/**
*
*/
export declare const Table: FC<TableProps>;