From e90cc37a9a786df4fefc86032ecd2ed5999831bd Mon Sep 17 00:00:00 2001 From: Lanskikh Date: Thu, 30 Oct 2025 15:36:19 +0500 Subject: [PATCH] Refactor Admin and Warning components for responsive design and adjust PopoverWrapper to simplify portal usage. Update size and border properties for better UI consistency. --- client/src/components/indicators/Admin.tsx | 2 +- client/src/components/indicators/Warning.tsx | 7 ++++--- client/src/components/ui/PopoverWrapper.tsx | 6 ++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/client/src/components/indicators/Admin.tsx b/client/src/components/indicators/Admin.tsx index adfed1d..d0bf3ed 100644 --- a/client/src/components/indicators/Admin.tsx +++ b/client/src/components/indicators/Admin.tsx @@ -5,7 +5,7 @@ export default function Admin({ className }: { className?: string }) { return (
diff --git a/client/src/components/indicators/Warning.tsx b/client/src/components/indicators/Warning.tsx index bc57cbf..7e9a7d1 100644 --- a/client/src/components/indicators/Warning.tsx +++ b/client/src/components/indicators/Warning.tsx @@ -10,9 +10,10 @@ export default function Warning({ return (
diff --git a/client/src/components/ui/PopoverWrapper.tsx b/client/src/components/ui/PopoverWrapper.tsx index b0da57a..fca7117 100644 --- a/client/src/components/ui/PopoverWrapper.tsx +++ b/client/src/components/ui/PopoverWrapper.tsx @@ -1,5 +1,4 @@ import { useEffect, useState } from "react"; -import { createPortal } from "react-dom"; import { AnimatePresence, motion } from "motion/react"; import clsx from "clsx"; @@ -88,7 +87,7 @@ function PopoverWrapper({ }; }; - return createPortal( + return ( {isOpened && ( {children}
)} - , - document.body + ); }