UNPKG

eventx-design-system

Version:
32 lines 1.25 kB
import React from 'react'; export interface TableColumn<T = any> { key: string; title: string; dataIndex?: keyof T; render?: (value: any, record: T, index: number) => React.ReactNode; sortable?: boolean; align?: 'left' | 'center' | 'right'; width?: string; fixed?: 'left' | 'right'; } export interface TableProps<T = any> { columns: TableColumn<T>[]; dataSource: T[]; loading?: boolean; variant?: 'default' | 'striped' | 'bordered'; hoverable?: boolean; selectable?: boolean; selectedRowKeys?: string[]; onRowSelect?: (selectedKeys: string[], selectedRows: T[]) => void; onRowClick?: (record: T, index: number) => void; sortConfig?: { key: string; direction: 'asc' | 'desc'; }; onSort?: (key: string, direction: 'asc' | 'desc') => void; rowKey?: string | ((record: T) => string); emptyText?: string; className?: string; } export declare const Table: <T extends Record<string, any> = any>({ columns, dataSource, loading, variant, hoverable, selectable, selectedRowKeys, onRowSelect, onRowClick, sortConfig, onSort, rowKey, emptyText, className, }: TableProps<T>) => import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=Table.d.ts.map