# All files / src/components/ui/sidebar-menu SidebarGroupLabel.tsx

0% Statements 0/30
0% Branches 0/1
0% Functions 0/1
0% Lines 0/30

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31

     "use client"

    import { ComponentProps } from "react"
    import { cn } from "@/lib/utils"

    export function SidebarGroupLabel({
      className,
      asChild = false,
      ...props
    }: ComponentProps<"div"> & { asChild?: boolean }) {
      const Comp = asChild ? "div" : "div"

      return (
        <Comp
          data-slot="sidebar-group-label"
          data-sidebar="group-label"
          className={cn(
            "flex h-8 shrink-0 items-center rounded-md px-2",
            "text-xs font-medium",
            "text-gray-600 dark:text-gray-400",
            "transition-[margin,opacity] duration-200 ease-linear",
            "focus-visible:ring-2 focus-visible:ring-offset-2",
            "[&>svg]:w-4 [&>svg]:h-4 [&>svg]:shrink-0",
            "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
            className
          )}
          {...props}
        />
      )
    }