https://dev.kronoz.win/r/marzneshin.git
1
2import { FC, PropsWithChildren } from "react"
3import { Label } from "@marzneshin/components"
4import { cn } from "@marzneshin/utils"
5import { useSidebarContext } from "./sidebar-provider";
6
7export interface SidebarGroupProps
8 extends PropsWithChildren {
9 className: string
10}
11
12export const SidebarGroup: FC<SidebarGroupProps> = ({ children, className }) => {
13 const { collapsed } = useSidebarContext();
14
15 if (!collapsed)
16 return (
17 <Label className={cn(className, "text-gray-500 font-header")}>
18 {children}
19 </Label>
20 )
21}