diff --git a/app/modules/SidePanel/SidePanel.tsx b/app/modules/SidePanel/SidePanel.tsx index 57ec64a81d..2116a17788 100644 --- a/app/modules/SidePanel/SidePanel.tsx +++ b/app/modules/SidePanel/SidePanel.tsx @@ -1,6 +1,4 @@ import { useState } from "react"; -import { Tabs } from "../Tabs"; -import { Transition } from "@headlessui/react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faChevronLeft, @@ -15,26 +13,20 @@ export const SidePanel = ({children}:Props) => { const [isVisible, setIsVisible] = useState(true); return ( -
+
- - - {children} - - +
+ {children} +
); diff --git a/app/modules/SidePanelOld/SidePanelInnerOld.tsx b/app/modules/SidePanelOld/SidePanelInnerOld.tsx deleted file mode 100644 index 3112e81c5d..0000000000 --- a/app/modules/SidePanelOld/SidePanelInnerOld.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import { useCallback, useLayoutEffect, useState } from "react"; -import { Dialog } from "@headlessui/react"; - -import { faXmark } from "@fortawesome/pro-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; - -import { TOP_BAR_HEIGHT } from "~/constants"; - -export const SidePanelInner = ({ - title, - children, - closeCallback, -}: { - title?: string; - children: React.ReactNode; - closeCallback: () => void; -}) => { - const [height, setHeight] = useState(0); - const handleWindowResize = useCallback(() => { - if (window) { - setHeight(Math.ceil((window.innerHeight * 3) / 4) - TOP_BAR_HEIGHT); - } - return 0; - }, []); - - useLayoutEffect(() => { - handleWindowResize(); - window.addEventListener("resize", handleWindowResize); - return () => { - window.removeEventListener("resize", handleWindowResize); - }; - }, [handleWindowResize]); - - return ( -
-
-
- {!title && } - {title && ( - - {title} - - )} -
- -
-
-
-
{children}
-
- ); -}; diff --git a/app/modules/SidePanelOld/SidePanelOld.tsx b/app/modules/SidePanelOld/SidePanelOld.tsx deleted file mode 100644 index b46e9841c7..0000000000 --- a/app/modules/SidePanelOld/SidePanelOld.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import { Fragment, useState } from "react"; -import { Dialog, Transition } from "@headlessui/react"; -import { faGears } from "@fortawesome/pro-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; - -import { Button } from "~/components/Button"; - -import { SidePanelInner } from "./SidePanelInnerOld"; - -interface SidePanelPropsI { - title?: string; - children: React.ReactNode; -} - -export const SidePanel = ({ title, children }: SidePanelPropsI) => { - const [open, setOpen] = useState(false); - const handleOpen = () => setOpen(true); - const handleClose = () => setOpen(false); - - return ( - <> - - - -
- -
-
-
- - - - {children} - - - -
-
-
-
-
- - ); -}; diff --git a/app/modules/SidePanelOld/index.tsx b/app/modules/SidePanelOld/index.tsx deleted file mode 100644 index 5f4f8914f6..0000000000 --- a/app/modules/SidePanelOld/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export { SidePanel } from "./SidePanelOld"; diff --git a/app/modules/Tabs/Tabs.tsx b/app/modules/Tabs/Tabs.tsx index 3a83dfbd65..b2ddd3e65b 100644 --- a/app/modules/Tabs/Tabs.tsx +++ b/app/modules/Tabs/Tabs.tsx @@ -19,7 +19,7 @@ export const Tabs = ({ tabs: tabProps }: { tabs: TabType[] }) => { ); return ( -
+
{tabs.map((tab, idx) => ( @@ -31,9 +31,9 @@ export const Tabs = ({ tabs: tabProps }: { tabs: TabType[] }) => { ))} - + {tabs.map((tab, idx) => ( - + {tab.children} ))} diff --git a/app/pages/PageCube/PageCube.tsx b/app/pages/PageCube/PageCube.tsx index 54faf66a60..f6d2062e5a 100644 --- a/app/pages/PageCube/PageCube.tsx +++ b/app/pages/PageCube/PageCube.tsx @@ -1,4 +1,4 @@ -import { useCallback, useContext, useEffect, useRef, useState } from "react"; +import { useCallback, useEffect, useRef, useState } from "react"; import { faChevronLeft } from "@fortawesome/pro-solid-svg-icons"; @@ -6,7 +6,7 @@ import { Button } from "~/components/Button"; import { ButtonLink } from "~/components/ButtonLink"; import { TopBarHelmet } from "~/modules/TopBarHelmet"; -import { SidePanel } from "~/modules/SidePanelOld"; +import { SidePanel } from "~/modules/SidePanel"; import { SceneWithCube } from "./SceneWithCube"; export const PageCube = () => { @@ -64,7 +64,7 @@ export const PageCube = () => {

Ration X: {rotationX ? rotationX : ""}

Ration Y: {rotationY ? rotationY : ""}

- +

Side Panel Context

diff --git a/app/pages/PageEnigma/comps/SidePanelTabs/TabStylization.tsx b/app/pages/PageEnigma/comps/SidePanelTabs/TabStylization.tsx index a356416e55..7cdad47d87 100644 --- a/app/pages/PageEnigma/comps/SidePanelTabs/TabStylization.tsx +++ b/app/pages/PageEnigma/comps/SidePanelTabs/TabStylization.tsx @@ -32,7 +32,7 @@ export const TabStylization = ()=>{ } } return( - <> +

Select Base Stylizer

{ }
- +
); } \ No newline at end of file