Alert Dialog Wrapper
AlertDialogWrapper is available at @hoag/ui/common/overlays/alert-dialog-wrapper.
Installation
pnpm --filter @hoag/ui buildUsage
import { AlertDialogWrapper } from "@hoag/ui/alert-dialog-wrapper";
import { Button } from "@hoag/ui/components/button";
<AlertDialogWrapper
trigger={<Button variant="destructive">Delete</Button>}
title="Delete item"
description="This action cannot be undone."
actionVariant="destructive"
actionLabel="Delete"
cancelLabel="Cancel"
/>;API Reference
| Prop | Type | Description |
|---|---|---|
trigger | ReactNode | Trigger node to open alert dialog. |
actionLabel / cancelLabel | string | Default action labels. |
actionVariant | "default" | "destructive" | Action button style. |
showDefaultActions | boolean | Use built-in action buttons. |
onActionClick / onCancelClick | callback | Action/cancel handlers. |