Files
low-code-react-app-b/src/lib/json-ui/interfaces/table.ts
johndoe6345789 eb8a8689fb feat: migrate Tier 3 atoms batch 6 - Slider through Tooltip (17 components)
Migrate the following components from TSX to JSON-driven architecture:
- Slider - range input control with label and value display
- Spinner - rotating loading indicator with Phosphor icons
- StatusIcon - saved/synced status indicators
- StepIndicator - step-by-step progress display
- Stepper - numbered step progression indicator
- Switch - toggle control with optional label
- Table - data table with columns and row handling
- Tabs - tabbed navigation with active state
- Tag - inline tag/badge with optional remove button
- TextArea - multiline text input with error state
- TextGradient - gradient text effect component
- TextHighlight - highlighted/emphasized text span
- Timeline - vertical timeline with status indicators
- Timestamp - date/time display with relative formatting
- Toggle - simple toggle switch control
- Tooltip - popover tooltip with positioning

Created:
- 17 TypeScript interface files in src/lib/json-ui/interfaces/
- 17 JSON definition files in src/components/json-definitions/
- Updated json-components.ts with imports and exports
- Updated json-components-registry.json to mark components as jsonCompatible

All components are pure JSON with no custom hooks required (stateless rendering).
Build successfully completes with no errors.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-21 01:43:09 +00:00

19 lines
377 B
TypeScript

import { ReactNode } from 'react'
export interface TableColumn<T> {
key: keyof T | string
header: string
render?: (item: T) => ReactNode
width?: string
}
export interface TableProps<T = Record<string, any>> {
data: T[]
columns: TableColumn<T>[]
onRowClick?: (item: T) => void
striped?: boolean
hoverable?: boolean
compact?: boolean
className?: string
}