refactoring

This commit is contained in:
2024-05-02 12:33:23 +05:00
parent ce6d660bd2
commit 7728815e11
6 changed files with 70 additions and 15 deletions
+19 -6
View File
@@ -5,6 +5,7 @@ import Button from "../Button";
import HintIcon from "../icons/HintIcon";
import ResizeIcon from "../icons/ResizeIcon";
import HelpModal from "../modals/HelpModal";
import ActiveResizeIcon from "../icons/ActiveResizeIcon";
const TopPanel = () => {
const [isFullMode, setIsFullMode] = useState(false);
@@ -27,12 +28,24 @@ const TopPanel = () => {
};
return (
<div className="absolute top-[62px] left-0 z-20 w-full p-4 flex justify-end gap-2">
<Button
buttonType="fab"
icon={<ResizeIcon />}
onClick={handleOnFullScreenClick}
/>
<div
className={`absolute ${
isFullMode ? "" : "top-[62px]"
} left-0 z-20 w-full p-4 flex justify-end gap-2`}
>
{isFullMode ? (
<Button
buttonType="fab"
icon={<ActiveResizeIcon />}
onClick={handleOnFullScreenClick}
/>
) : (
<Button
buttonType="fab"
icon={<ResizeIcon />}
onClick={handleOnFullScreenClick}
/>
)}
<Button
buttonType="fab"
icon={<HintIcon />}