UNPKG

adwaita-web

Version:

A GTK inspired toolkit designed to build awesome web apps

32 lines (31 loc) 1.13 kB
import React from "react"; import type * as ReactTable from "react-table"; export type { ReactTable as ReactTableTypes }; /** * A column as defined by * {@link https://react-table-v7.tanstack.com/docs/api/useTable#column-options react-table} * package. */ export declare type Column<T extends object> = { id?: string; Cell?: React.ReactNode | React.ComponentType<ReactTable.CellProps<T>>; Header?: React.ReactNode | React.ComponentType<ReactTable.HeaderProps<T>>; Footer?: React.ReactNode | React.ComponentType<ReactTable.FooterProps<T>>; width?: number | string; minWidth?: number; maxWidth?: number; accessor?: string | ((originalRow: T, index: number, sub: { subRows: T[]; depth: number; data: T[]; }) => any); columns: object[]; }; export declare type TableProps = { className?: string; columns: Array<Column<Record<string, any>>>; data: Array<Record<string, any>>; sortable?: boolean; filterable?: boolean; }; export declare function Table({ className, columns: columnsValue, data, sortable, filterable, ...rest }: TableProps): JSX.Element;