diff --git a/app/components/Modal.tsx b/app/components/Modal.tsx index d17e5f0..17b8775 100644 --- a/app/components/Modal.tsx +++ b/app/components/Modal.tsx @@ -1,7 +1,7 @@ import { Dialog, Transition } from '@headlessui/react' import { XMarkIcon } from '@heroicons/react/24/outline' import clsx from 'clsx' -import { Fragment, type SetStateAction, useState } from 'react' +import { Fragment, type ReactNode, type SetStateAction, useState } from 'react' import Button from './Button' @@ -10,6 +10,7 @@ type HookParameters = { description?: string; buttonText?: string; variant?: 'danger' | 'confirm'; + children?: ReactNode; // Optional because the button submits onConfirm?: () => void | Promise; @@ -100,11 +101,17 @@ function Modal({ parameters, isOpen, setIsOpen }: Properties) { {parameters.description} ) : undefined} + {parameters.children ? ( +
+ {parameters.children} +
+ ) : undefined} - { - setIsOpen(false) - }} - > - + {Modal} ) }