UNPKG

@achs/webkit

Version:

Este paquete proporciona un conjunto de componentes de UI para su uso en aplicaciones web de ACHS (Asociación Chilena de Seguridad). Está construido con React, TypeScript y Vite.

24 lines (23 loc) 839 B
import { default as React } from 'react'; export interface ColumnType<T> { key: string; title: string; dataIndex?: keyof T; align?: 'left' | 'center' | 'right'; render?: (value: T[keyof T], record: T, index: number) => React.ReactNode; width?: string | number; } export interface RowSelection<T> { selectedRowKeys: React.Key[]; onChange: (selectedKeys: React.Key[], selectedRows: T[]) => void; } export interface TableProps<T> { columns: ColumnType<T>[]; dataSource: T[]; rowKey?: keyof T; color?: 'primary' | 'secondary' | 'tertiary'; className?: string; rowSelection?: RowSelection<T>; } export declare function Table<T extends object>({ columns, dataSource, rowKey, color, className, rowSelection, }: TableProps<T>): import("react/jsx-runtime").JSX.Element; export default Table;