@hoag/ui — UI components built with shadcn, Radix UI & Tailwind CSS
Components
Alert Dialog Wrapper

Alert Dialog Wrapper

AlertDialogWrapper is available at @hoag/ui/common/overlays/alert-dialog-wrapper.

Installation

pnpm --filter @hoag/ui build

Usage

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

PropTypeDescription
triggerReactNodeTrigger node to open alert dialog.
actionLabel / cancelLabelstringDefault action labels.
actionVariant"default" | "destructive"Action button style.
showDefaultActionsbooleanUse built-in action buttons.
onActionClick / onCancelClickcallbackAction/cancel handlers.