UNPKG

obss-air-command-component-library

Version:
41 lines (40 loc) 1.13 kB
import React from 'react'; export interface TableColumn { key: string; label: string; width?: number; align?: 'left' | 'center' | 'right'; sortable?: boolean; sortDirection?: 'asc' | 'desc'; sortType?: 'alphabetical' | 'categorical' | 'numeric'; } export interface TableRow { [key: string]: React.ReactNode; } export interface SortConfig { key: string; direction: 'asc' | 'desc'; priority: number; } export interface TableProps { columns: TableColumn[]; data: TableRow[]; highlightRow?: number; selectedRow?: number; showToolbar?: boolean; toolbarInfo?: string; isLoading?: boolean; error?: string | null; emptyMessage?: string; sortConfig?: SortConfig[]; onSort?: (sortConfig: SortConfig[]) => void; onRowClick?: (rowIndex: number, row: TableRow) => void; onRowSelect?: (rowIndex: number, row: TableRow) => void; onAddClick?: () => void; onEditClick?: () => void; onDeleteClick?: () => void; onRefreshClick?: () => void; theme?: 'light' | 'dark'; } declare const Table: React.FC<TableProps>; export default Table;