From 93733663fb0b0615b92507a23387926a59f6719e Mon Sep 17 00:00:00 2001 From: Lanskikh Date: Tue, 21 Oct 2025 19:41:57 +0500 Subject: [PATCH] upd --- client/src/components/DraggableContainer.tsx | 5 +++-- client/src/components/PopupWrapper.tsx | 6 ++---- client/src/components/popups/ChatPopup.tsx | 15 +++++++++------ 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/client/src/components/DraggableContainer.tsx b/client/src/components/DraggableContainer.tsx index 9333b30..fbedf11 100644 --- a/client/src/components/DraggableContainer.tsx +++ b/client/src/components/DraggableContainer.tsx @@ -77,7 +77,7 @@ export default function DraggableContainer({ constrainToBounds = false, initialCorner, initialPosition, - padding = "20px", + padding = "16px", className = "", onPositionChange, }: DraggableContainerProps) { @@ -329,7 +329,8 @@ export default function DraggableContainer({ if (position.top !== undefined) style.top = formatValue(position.top); if (position.left !== undefined) style.left = formatValue(position.left); if (position.right !== undefined) style.right = formatValue(position.right); - if (position.bottom !== undefined) style.bottom = formatValue(position.bottom); + if (position.bottom !== undefined) + style.bottom = formatValue(position.bottom); return style; }; diff --git a/client/src/components/PopupWrapper.tsx b/client/src/components/PopupWrapper.tsx index e253e2e..99e4ad7 100644 --- a/client/src/components/PopupWrapper.tsx +++ b/client/src/components/PopupWrapper.tsx @@ -1,7 +1,6 @@ /* eslint-disable react-hooks/exhaustive-deps */ import clsx from "clsx"; import PopupHeader from "./PopupHeader"; -import DraggableContainer from "./DraggableContainer"; interface PopupWrapperProps { children: React.ReactNode; @@ -19,8 +18,7 @@ function PopupWrapper({ draggable, }: PopupWrapperProps) { return ( -
{children}
-
+ ); } diff --git a/client/src/components/popups/ChatPopup.tsx b/client/src/components/popups/ChatPopup.tsx index cc0ba1a..8e419de 100644 --- a/client/src/components/popups/ChatPopup.tsx +++ b/client/src/components/popups/ChatPopup.tsx @@ -4,6 +4,7 @@ import Button from "../ui/Button"; import { useMe } from "../../hooks/useAuth"; import clsx from "clsx"; import PopupWrapper from "../PopupWrapper"; +import DraggableContainer from "../DraggableContainer"; export default function ChatPopup() { const [messages, setMessages] = useState([ @@ -32,12 +33,14 @@ export default function ChatPopup() { } return ( - -
- - -
-
+ + +
+ + +
+
+
); }