import * as React from "react"; import * as AlertDialog from "@radix-ui/react-alert-dialog"; import "./AlertDialog.scss"; export type AlertDialogProps = { trigger: any; title: string; description: string; showCancel?: boolean; options?: JSX.IntrinsicElements["button"][]; }; const CustomAlertDialog = ({ trigger, title, description, showCancel = true, options, }: AlertDialogProps) => ( {trigger} {title} {description}
{showCancel && ( )} {options?.length && options.map((o: any) => ( {o} ))}
); export default CustomAlertDialog;