diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index 690547b..751c100 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -1,12 +1,12 @@ import { useState } from 'react' import { NavLink, useNavigate, useLocation } from 'react-router-dom' -import { LayoutGrid, Users, Activity, Settings, LogOut, ChevronDown, ShieldCheck, Building2 } from 'lucide-react' +import { LayoutGrid, Users, Activity, Settings, LogOut, ChevronDown, ChevronLeft, ShieldCheck, Building2 } from 'lucide-react' import { AppIcon } from './AppIcon' import type { User, App } from '../types' -interface Props { user: User; activeSlug?: string } +interface Props { user: User; activeSlug?: string; onCollapse?: () => void } -export function Sidebar({ user, activeSlug }: Props) { +export function Sidebar({ user, activeSlug, onCollapse }: Props) { const navigate = useNavigate() const location = useLocation() @@ -52,13 +52,27 @@ export function Sidebar({ user, activeSlug }: Props) { display: 'flex', flexDirection: 'column', height: '100dvh', position: 'sticky', top: 0, }}> -
-
- MANAGE -
-
- {import.meta.env.VITE_HOTEL_NAME} +
+
+
+ MANAGE +
+
+ {import.meta.env.VITE_HOTEL_NAME} +
+ {onCollapse && ( + + )}