UNPKG

air-command-ui-library

Version:

A React component library for Air Command System with Storybook

43 lines (42 loc) 1.3 kB
import React from 'react'; export type SortDirection = 'asc' | 'desc' | null; export interface SortState { columnKey: string | null; direction: SortDirection; } export interface CompoundSortState { primary: { columnKey: string | null; direction: SortDirection; }; secondary: { columnKey: string | null; direction: SortDirection; }; } export type ClassificationStatus = 'FRIENDLY' | 'HOSTILE' | 'NEUTRAL' | 'UNKNOWN'; export interface ColumnType { key: string; title: string; dataIndex: string; width?: string; align?: 'left' | 'center' | 'right'; sortable?: boolean; render?: (value: any, record: any, index: number) => React.ReactNode; } export interface TableProps { columns: ColumnType[]; dataSource: Record<string, any>[]; theme?: 'light' | 'dark'; rowSelection?: boolean; selectedRowKeys?: (string | number)[]; onRowSelectionChange?: (selectedRowKeys: (string | number)[], selectedRows: Record<string, any>[]) => void; onSort?: (columnKey: string, direction: SortDirection) => void; loading?: boolean; emptyText?: string; height?: string | number; bordered?: boolean; className?: string; style?: React.CSSProperties; compoundSortState?: CompoundSortState; }