Enhance DraggableContainer to support dragHandleRef for improved drag functionality. Update Popup components (PopupHeader, PopupWrapper, ChatPopup, ParticipantsPopup, QRCodePopup, SharePopup) to utilize dragHandleRef, allowing dragging only from specified elements. Improve cursor styles during dragging for better user experience.

This commit is contained in:
2025-10-22 15:12:00 +05:00
parent c6f5c39725
commit 51f2013bee
7 changed files with 70 additions and 8 deletions
+6 -2
View File
@@ -5,13 +5,17 @@ import Button from "./ui/Button";
interface PopupHeaderProps {
title?: string;
leftButton?: React.ReactNode;
ref?: React.RefObject<HTMLDivElement | null>;
}
function PopupHeader({ title, leftButton }: PopupHeaderProps) {
function PopupHeader({ title, leftButton, ref }: PopupHeaderProps) {
const { setPopup } = usePopupStore();
return (
<div className="2xl:p-[1.111vw] p-4 flex justify-between items-center select-none relative">
<div
ref={ref}
className="2xl:p-[1.111vw] p-4 flex justify-between items-center select-none relative"
>
<div className="2xl:size-[2.222vw] size-8">{leftButton}</div>
{title && (
<p className="flex-1 font-medium text-center title-s">{title}</p>