@stakefish/ui
Version:
<div align="center"> <a href="https://www.npmjs.com/package/@stakefish/ui"><img src="https://gateway.pinata.cloud/ipfs/QmbZL1ceA8Yiz2pKALTg919jYx141DPUGegC9L4XpyayW5" width="300" /></a> </div>
35 lines (34 loc) • 1.07 kB
TypeScript
/// <reference types="react" />
import { TableHeadProps as MuiTableHeadProps } from "@mui/material/TableHead";
import { TableCellProps as MuiTableCellProps } from "@mui/material/TableCell";
import { Order, CellDataKeys } from "./TableContainer";
export interface HeadCell {
/**
* The id that's identical with the cellKey of all CellData in the same column
*/
id: CellDataKeys;
/**
* The actual content to be rendered
*/
label: string;
/**
* Additional props to decorate tableCell
*/
props?: {
[key in keyof MuiTableCellProps]: any;
};
}
export interface HeadSortCell extends HeadCell {
/**
* Enable sorting ability
*/
sortable?: boolean;
}
export interface TableHeadSortProps extends MuiTableHeadProps {
headCells: HeadSortCell[];
order: Order;
orderBy: string;
onRequestSort: (event: React.MouseEvent<unknown>, property: CellDataKeys) => void;
}
declare const TableHeadSort: React.FC<TableHeadSortProps>;
export default TableHeadSort;