@hanzo/ui

DialogTemplate

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

No examples yet.

Types

export type DialogAction = {
  label: string
  onPress?: () => void
  tone?: 'default' | 'danger'
  disabled?: boolean
}
export type DialogTemplateProps = Omit<ComponentProps<typeof DialogContent>, 'title'> & {
  title: ReactNode
  /** One line under the title. A paragraph belongs in `children`. */
  description?: ReactNode
  /** The body. Omit it for a plain confirm. */
  children?: ReactNode
  /** The affirmative action. Omit it for a dialog that only informs. */
  confirm?: DialogAction
  /** Overrides the cancel label. */
  cancelLabel?: string
  /** Drops cancel — only for a dialog with no way to get it wrong. */
  showCancel?: boolean
  /** Extra controls, left-aligned opposite the confirm pair. */
  leftActions?: ReactNode
  /** A request is in flight: both actions are disabled. */
  busy?: boolean
}

Exports

DialogTemplatetype DialogActiontype DialogTemplateProps