feat(theme): add theme toggle component and integrate into sidebar

This commit is contained in:
Mathis HERRIOT
2026-01-20 16:27:24 +01:00
parent a6e34c511e
commit 3b9b73bc4b
3 changed files with 59 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ import Link from "next/link";
import { usePathname, useSearchParams } from "next/navigation";
import * as React from "react";
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
import { ModeToggle } from "@/components/mode-toggle";
import {
Collapsible,
CollapsibleContent,
@@ -286,6 +287,14 @@ export function AppSidebar() {
</SidebarMenuButton>
</SidebarMenuItem>
)}
<SidebarMenuItem>
<div className="flex items-center justify-between px-2 py-2">
<span className="text-xs font-medium text-muted-foreground group-data-[collapsible=icon]:hidden">
Thème
</span>
<ModeToggle />
</div>
</SidebarMenuItem>
<SidebarMenuItem>
<SidebarMenuButton asChild tooltip="Aide">
<Link href="/help">