diff --git a/src/components/resources/Sidebar/Sidebar.model.ts b/src/components/resources/Sidebar/Sidebar.model.ts index 15e349b..1ae10b3 100644 --- a/src/components/resources/Sidebar/Sidebar.model.ts +++ b/src/components/resources/Sidebar/Sidebar.model.ts @@ -1,17 +1,10 @@ export interface SidebarItem { - title: string; - path?: string; - children?: SidebarItem[]; -} - -export interface SidebarItemGroup { title: string; path?: string; icon?: string; color?: string; children?: SidebarItem[]; } - export interface SidebarItemProps { item: SidebarItem; depth: number; diff --git a/src/components/resources/Sidebar/Sidebar.style.scss b/src/components/resources/Sidebar/Sidebar.style.scss index 2b6dc1c..8e1dd57 100644 --- a/src/components/resources/Sidebar/Sidebar.style.scss +++ b/src/components/resources/Sidebar/Sidebar.style.scss @@ -3,7 +3,7 @@ width: 260px; flex-shrink: 0; height: 100vh; - overflow: auto; + overflow-y: auto; color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 1rem; @@ -57,12 +57,13 @@ } .sidebar-content { - height: 0; + max-height: 0; overflow: hidden; + transition: max-height 2s ease-in-out; } .sidebar-content.open { - height: auto; + max-height: 10000px; /* random value, just needs to be higher than the maximum possible height of a submenu */ } .sidebar-item.plain { diff --git a/src/components/resources/Sidebar/Sidebar.tsx b/src/components/resources/Sidebar/Sidebar.tsx index 0cfaede..b31e477 100644 --- a/src/components/resources/Sidebar/Sidebar.tsx +++ b/src/components/resources/Sidebar/Sidebar.tsx @@ -6,7 +6,7 @@ export default function Sidebar() { return (