UNPKG

@stanfordspezi/spezi-web-design-system

Version:

Stanford Biodesign Digital Health Spezi Web Design System

33 lines (32 loc) 1.08 kB
import { ComponentProps, MouseEventHandler, ReactNode } from 'react'; import { Dialog } from '../../components/Dialog'; interface ConfirmDeleteDialogProps extends ComponentProps<typeof Dialog> { /** * Name of distinctive item identifier. * It allows the user to see what they're deleting right before confirming. * @example "example@example.com" */ itemName?: ReactNode; /** * Name of deleted entity model name. * @example "user" */ entityName?: ReactNode; onDelete: MouseEventHandler; } /** * A dialog component for confirming destructive actions like deletion. * Built on top of the Dialog component, it provides a consistent interface * for confirming irreversible actions. * * @example * <ConfirmDeleteDialog * entityName="user" * itemName="john@example.com" * onDelete={handleDelete} * open={isOpen} * onOpenChange={setIsOpen} * /> */ export declare const ConfirmDeleteDialog: ({ entityName, itemName, onDelete, ...props }: ConfirmDeleteDialogProps) => import("react").JSX.Element; export {};