UNPKG

copper-ui

Version:

Modern React UI components library with TypeScript support, built on top of Ant Design

30 lines 1.27 kB
import { ReactNode } from '../../../../node_modules/.pnpm/react@19.1.1/node_modules/react'; export type TExpandedState = Record<string, boolean>; export type TExpandIconProps<TItem> = { expanded: boolean; record: TItem; onExpand: () => void; }; export type TExpandableConfig<TItem> = { /** Render content for expanded row (required) */ expandedRowRender: (record: TItem, index: number, expanded: boolean) => ReactNode; /** Controlled expanded state */ expanded?: TExpandedState; /** Callback when expanded state changes */ onExpandedChange?: (expanded: TExpandedState) => void; /** Callback when specific row is expanded/collapsed */ onExpand?: (expanded: boolean, record: TItem) => void; /** Expand row by clicking anywhere on the row */ expandRowByClick?: boolean; /** Only one row can be expanded at a time */ accordion?: boolean; /** Animate expand/collapse */ animated?: boolean; /** Custom expand icon */ expandIcon?: (props: TExpandIconProps<TItem>) => ReactNode; /** Column index for expand icon (default: 0) */ expandIconColumnIndex?: number; /** Determine if row can be expanded */ rowExpandable?: (record: TItem) => boolean; }; //# sourceMappingURL=expand.types.d.ts.map