UNPKG

@tritium-research/react-component

Version:

A react component library based on material-ui, build for tritium internal usecases.

27 lines (26 loc) 809 B
import { SxProps, TableHeadProps, TableBodyProps } from "@mui/material"; import { ReactNode } from "react"; export interface Column { id: string; label: string; minWidth?: number; enableSort?: boolean; align?: "right" | "center" | "left"; onSort?: ({ id, order, }: { id: string; order: "ascending" | "descending"; }) => void; format?: (value: number) => string; renderValue?: (value: any) => void; } export interface TableProps { rows: Array<any> | undefined; columns: Array<Column>; sx?: SxProps; tableHeadProps?: TableHeadProps; tableBodyProps?: TableBodyProps; headerCellSx?: SxProps; bodyCellSx?: SxProps; sortIcon?: ReactNode; } export default function Table(props: TableProps): import("react/jsx-runtime").JSX.Element;