Snai3i-LandingPage-FormBuilder / frontend / src / components / AlertDialogForm / index.tsx
index.tsx
Raw
import {
  AlertDialog,
  // AlertDialogAction,
  AlertDialogCancel,
  AlertDialogContent,
  AlertDialogHeader,
  AlertDialogTrigger,
} from '@/components/ui/alert-dialog';
import { ReactNode, FC } from 'react';

type Props = {
  children: ReactNode;
  Form: ReactNode;
};

const AlertDialogDemo: FC<Props> = ({
  children,
  Form,
}) => {
  return (
    <AlertDialog>
      <AlertDialogTrigger asChild>{children}</AlertDialogTrigger>
      <AlertDialogContent className='pt-0 px-8'>
        <AlertDialogHeader></AlertDialogHeader>
        {/* <AlertDialogAction >{action}</AlertDialogAction> */}
        {Form}
        <AlertDialogCancel>Cancel</AlertDialogCancel>
      </AlertDialogContent>
    </AlertDialog>
  );
};

export default AlertDialogDemo;