From 866d578c079a34f1b4193dac3b72e607cb920e03 Mon Sep 17 00:00:00 2001 From: severinlandolt Date: Fri, 6 Dec 2024 17:05:35 +0100 Subject: [PATCH] fix: dialog --- .../layout-elements/Dialog/Dialog.tsx | 26 +++++-------------- src/tests/layout-elements/Dialog.test.tsx | 2 +- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/src/components/layout-elements/Dialog/Dialog.tsx b/src/components/layout-elements/Dialog/Dialog.tsx index 1b2afbd7c..df88bb87b 100644 --- a/src/components/layout-elements/Dialog/Dialog.tsx +++ b/src/components/layout-elements/Dialog/Dialog.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { Dialog as HeadlessuiDialog, Transition } from "@headlessui/react"; +import { Dialog as HeadlessUiDialog, DialogBackdrop, Transition } from "@headlessui/react"; import { makeClassName, tremorTwMerge } from "lib"; const makeDisplayClassName = makeClassName("dialog"); @@ -17,31 +17,19 @@ const Dialog = React.forwardRef((props, ref) => { const { children, className, ...other } = props; return ( - - -
-
+
{children}
-
+
); }); diff --git a/src/tests/layout-elements/Dialog.test.tsx b/src/tests/layout-elements/Dialog.test.tsx index 4058ed172..c2efd36d5 100644 --- a/src/tests/layout-elements/Dialog.test.tsx +++ b/src/tests/layout-elements/Dialog.test.tsx @@ -6,7 +6,7 @@ import { Dialog, DialogPanel } from "components"; describe("Dialog", () => { test("renders the Dialog component", async () => { const { findByText } = render( - {}}> + {}} static={true}> Test , );