UNPKG

table-view-react

Version:

A customizable, reusable table component for React that allows dynamic row rendering, customizable headers, optional buttons in each row, and click event handling.

26 lines (25 loc) 633 B
import React from "react"; interface TableProps { data: Array<Record<string, string | number>>; onViewClick?: (row: Record<string, string | number>) => void; headingColors?: { text: string; background: string; }; rowColors?: { text: string; background: string; }; buttonText?: string; buttonFunction?: (row: Record<string, string | number>) => void; ranges?: Record<string, { low: number; high: number; }>; cellColors?: { light: string; dark: string; }; } declare const Table: React.FC<TableProps>; export default Table;