@hanzo/ui

DataTable

import { DataTable } from '@hanzo/ui/product'

No examples yet.

Types

export type Column<T> = {
  key: string
  header: string
  /** Cell renderer; defaults to `String(row[key])`. */
  render?: (row: T) => ReactNode
  /** Fixed width (px) for the column; otherwise flexes. */
  width?: number
  /** Horizontal alignment — `right` for numeric/amount columns. */
  align?: 'left' | 'right'
  /** Typeset the default cell + header as Zen Mono tabular (counts, amounts, IDs). */
  mono?: boolean
  /** Clickable header that reports `onSortChange(key)` (needs both table props). */
  sortable?: boolean
}
export type SortState = { key: string; dir: 'asc' | 'desc' }

Exports

DataTabletype Columntype SortState