UNPKG

react-chakra-table

Version:

a simple, sortable, filterable, react table grid - styled with chakra-ui.

42 lines 1.52 kB
/// <reference types="react" /> import { CellContext, ColumnFiltersState, Row, SortingState } from "@tanstack/react-table"; import { ButtonProps, IconButtonProps, TableContainerProps } from "@chakra-ui/react"; export interface ReactChakraTableColumn { accessorFn: (row: any) => void; id: string; cell: (info: CellContext<any, unknown>) => void; aggregatedCell?: (info: CellContext<any, unknown>) => void; header: string; enableColumnFilters?: boolean; } export interface ReactChakraTableProps { columns: ReactChakraTableColumn[]; dateColumns: string[]; data: any[]; amountText?: string; exportText?: string; language?: string; sortIconColor?: string; sortIconUp?: any; sortIconDown?: any; exportIcon?: any; paginationPageButtonProps?: ButtonProps; paginationNextPrevButtonProps?: IconButtonProps; paginationNextIcon?: any; paginationPrevIcon?: any; exportButtonProps?: ButtonProps; filterByText?: string; defaultSorting?: SortingState; defaultFiltering?: ColumnFiltersState; itemsPerPage?: number; tableContainerProps?: TableContainerProps; onRowClick?: (row?: Row<any>) => void; } /** * Displays a table-grid, based on ChakraUI, with filtering and sorting options. * For further details visit: https://github.com/kevinschmidt777/react-chakra-table/ * @returns */ declare const ReactChakraTable: (props: ReactChakraTableProps) => JSX.Element; export default ReactChakraTable; //# sourceMappingURL=index.d.ts.map