diff --git a/src/components/layout/app-sidebar.tsx b/src/components/layout/app-sidebar.tsx index e43197052..32d944327 100644 --- a/src/components/layout/app-sidebar.tsx +++ b/src/components/layout/app-sidebar.tsx @@ -6,6 +6,7 @@ import { SidebarHeader, SidebarRail, } from '@/components/ui/sidebar' +// import { AppTitle } from './app-title' import { sidebarData } from './data/sidebar-data' import { NavGroup } from './nav-group' import { NavUser } from './nav-user' @@ -17,6 +18,10 @@ export function AppSidebar() { + + {/* Replace with the following + /* if you want to use the normal app title instead of TeamSwitch dropdown */} + {/* */} {sidebarData.navGroups.map((props) => ( diff --git a/src/components/layout/app-title.tsx b/src/components/layout/app-title.tsx new file mode 100644 index 000000000..112e4634e --- /dev/null +++ b/src/components/layout/app-title.tsx @@ -0,0 +1,64 @@ +import { Link } from '@tanstack/react-router' +import { Menu, X } from 'lucide-react' +import { cn } from '@/lib/utils' +import { + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + useSidebar, +} from '@/components/ui/sidebar' +import { Button } from '../ui/button' + +export function AppTitle() { + const { setOpenMobile } = useSidebar() + return ( + + + +
+ setOpenMobile(false)} + className='grid flex-1 text-start text-sm leading-tight' + > + Shadcn-Admin + Vite + ShadcnUI + + +
+
+
+
+ ) +} + +function ToggleSidebar({ + className, + onClick, + ...props +}: React.ComponentProps) { + const { toggleSidebar } = useSidebar() + + return ( + + ) +}