tuil
ReferenceComponentsDialogs, toasts, and overlays

ConfirmDialogProps

ConfirmDialogProps component contract.

View rawEdit

Type

export interface ConfirmDialogProps extends Omit<DialogProps, "children"> {
  readonly title: string;
  readonly description?: string;
  readonly confirmLabel?: string;
  readonly cancelLabel?: string;
  readonly danger?: boolean;
  readonly onConfirm: () => void | Promise<void>;
  readonly onCancel?: () => void | Promise<void>;
  readonly trigger?: ReactNode;
}

Members

MemberTypeRequiredDescriptionRelated types
titlestringYesThe title member uses the string contract.
descriptionstring | undefinedNoThe description member uses the string | undefined contract.
confirmLabelstring | undefinedNoThe confirmLabel member uses the string | undefined contract.
cancelLabelstring | undefinedNoThe cancelLabel member uses the string | undefined contract.
dangerboolean | undefinedNoThe danger member uses the boolean | undefined contract.
onConfirm() => void | Promise<void>YesThe onConfirm member uses the () => void | Promise<void> contract.
onCancel(() => void | Promise<void>) | undefinedNoThe onCancel member uses the (() => void | Promise<void>) | undefined contract.
triggerReactNodeNoThe trigger member uses the ReactNode contract.
idstring | undefinedNoThe id member uses the string | undefined contract.
openboolean | undefinedNoThe open member uses the boolean | undefined contract.
defaultOpenboolean | undefinedNoThe defaultOpen member uses the boolean | undefined contract.
onOpenChange((open: boolean) => void | Promise<void>) | undefinedNoThe onOpenChange member uses the ((open: boolean) => void | Promise<void>) | undefined contract.

Source

View the secondary source reference

On this page