From 5371135583e757be4e6266793c5640167204bf22 Mon Sep 17 00:00:00 2001 From: pheralb Date: Mon, 21 Nov 2022 15:52:02 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9A=92=EF=B8=8F=20Fix=20UI=20components.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ui/dropdown.tsx | 2 +- src/ui/modal.tsx | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/ui/dropdown.tsx b/src/ui/dropdown.tsx index 100c795..11ff0ee 100644 --- a/src/ui/dropdown.tsx +++ b/src/ui/dropdown.tsx @@ -25,7 +25,7 @@ export const Dropdown = (props: DropdownProps) => { leaveFrom="transform opacity-100 scale-100" leaveTo="transform opacity-0 scale-95" > - +
{props.children}
diff --git a/src/ui/modal.tsx b/src/ui/modal.tsx index e299553..320395f 100644 --- a/src/ui/modal.tsx +++ b/src/ui/modal.tsx @@ -2,7 +2,7 @@ import { Dialog, Transition } from "@headlessui/react"; import { Fragment } from "react"; interface ModalProps { - title: string; + title?: string; children: React.ReactNode; className?: string; open: boolean; @@ -37,12 +37,14 @@ const Modal = (props: ModalProps) => { leaveTo="opacity-0 scale-95" > - - {props.title} - + {props.title && ( + + {props.title} + + )} {props.children}