diff --git a/pkgs/clan-app/ui/src/components/Sidebar/SidebarPane.css b/pkgs/clan-app/ui/src/components/Sidebar/SidebarPane.css index bfdb7ef39..d1a62ed42 100644 --- a/pkgs/clan-app/ui/src/components/Sidebar/SidebarPane.css +++ b/pkgs/clan-app/ui/src/components/Sidebar/SidebarPane.css @@ -3,6 +3,10 @@ div.sidebar-pane { animation: sidebarPaneShow 250ms ease-in forwards; + &.open { + @apply w-60; + } + &.closing { animation: sidebarPaneHide 250ms ease-out 300ms forwards; diff --git a/pkgs/clan-app/ui/src/components/Sidebar/SidebarPane.tsx b/pkgs/clan-app/ui/src/components/Sidebar/SidebarPane.tsx index f80863c3b..f43b3c433 100644 --- a/pkgs/clan-app/ui/src/components/Sidebar/SidebarPane.tsx +++ b/pkgs/clan-app/ui/src/components/Sidebar/SidebarPane.tsx @@ -1,4 +1,4 @@ -import { createSignal, JSX } from "solid-js"; +import { createSignal, JSX, onMount } from "solid-js"; import "./SidebarPane.css"; import { Typography } from "@/src/components/Typography/Typography"; import Icon from "../Icon/Icon"; @@ -13,14 +13,20 @@ export interface SidebarPaneProps { export const SidebarPane = (props: SidebarPaneProps) => { const [closing, setClosing] = createSignal(false); + const [open, setOpened] = createSignal(true); const onClose = () => { setClosing(true); setTimeout(() => props.onClose(), 550); }; + onMount(() => { + setTimeout(() => { + setOpened(true); + }, 250); + }); return ( -
+
{props.title}