import { AlertCircleIcon, InfoIcon } from 'lucide-react'; import type { ReactNode } from 'react'; import { chain } from 'react-aria'; import { type DialogProps, Heading } from 'react-aria-components/Dialog'; import { Button } from './Button'; import { Dialog } from './Dialog'; interface AlertDialogProps extends Omit { title: string; children: ReactNode; variant?: 'info' | 'destructive'; actionLabel: string; includeCancel?: boolean; cancelLabel?: string; onAction?: () => void; } export function AlertDialog({ title, variant, includeCancel = true, cancelLabel, actionLabel, onAction, children, ...props }: AlertDialogProps) { return ( {({ close }) => ( <> {title}
{variant === 'destructive' ? ( ) : ( )}
{children}
{includeCancel && ( )}
)}
); }