@hanzo/ui

Instrument

import { emit, useEmit, labelOf, InstrumentSurface, useSurface, textSize } from '@hanzo/ui/product'

No examples yet.

Types

export type UiAction =
  | 'click'
  | 'open'
  | 'close'
  | 'select'
  | 'change'
  | 'sort'
  | 'filter'
  | 'search'
  | 'confirm'
  | 'cancel'
  | 'dismiss'
  | 'expand'
  | 'view'
  | 'error'
export interface UiEvent {
  /** The shared component that observed it — `DataTable`, `PrimaryButton`, … */
  component: string
  action: UiAction
  /** The thing acted on: a column key, an option value, a menu item id. */
  id?: string
  /** A small scalar detail (sort direction, boolean state, count). Never PII —
   *  free-text values (search terms, field contents) are reported as a LENGTH,
   *  by the caller, not as the text. */
  value?: string | number | boolean
  /** The product area, when the app declared one via `<InstrumentSurface/>`. */
  surface?: string
}

Exports

emituseEmitlabelOfInstrumentSurfaceuseSurfacetextSizetype UiActiontype UiEvent