UNPKG

debt-collector

Version:

a nodejs tool to identify, track and mesure technical debt

49 lines (48 loc) 1.41 kB
import React from 'react'; type Scalar = string | number | boolean | null | undefined; type ScalarDict = { [key: string]: Scalar; }; export type CellProps = React.PropsWithChildren<{ column: number; }>; export type TableProps<T extends ScalarDict> = { /** * List of values (rows). */ data: T[]; /** * Columns that we should display in the table. */ columns?: (keyof T)[]; /** * Cell padding. */ padding?: number; /** * Header component. */ header?: (props: React.PropsWithChildren<{}>) => JSX.Element; /** * Component used to render a cell in the table. */ cell?: (props: CellProps) => JSX.Element; /** * Component used to render the skeleton of the table. */ skeleton?: (props: React.PropsWithChildren<{}>) => JSX.Element; }; export default function Table<T extends ScalarDict>(props: TableProps<T>): import("react/jsx-runtime").JSX.Element; /** * Renders the header of a table. */ export declare function Header(props: React.PropsWithChildren<{}>): import("react/jsx-runtime").JSX.Element; /** * Renders a cell in the table. */ export declare function Cell(props: CellProps): import("react/jsx-runtime").JSX.Element; /** * Redners the scaffold of the table. */ export declare function Skeleton(props: React.PropsWithChildren<{}>): import("react/jsx-runtime").JSX.Element; export {};