# All files / src/components/ui sidebar-parts.tsx

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

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
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82

     "use client"

    import { ComponentProps } from "react"
    import { cn } from "@/lib/utils"
    import { Input } from "@/components/ui/input"
    import { Separator } from "@/components/ui/separator"

    export function SidebarInput({
      className,
      ...props
    }: ComponentProps<typeof Input>) {
      return (
        <Input
          data-slot="sidebar-input"
          data-sidebar="input"
          className={cn("bg-background h-8 w-full shadow-none", className)}
          {...props}
        />
      )
    }

    export function SidebarHeader({ className, ...props }: ComponentProps<"div">) {
      return (
        <div
          data-slot="sidebar-header"
          data-sidebar="header"
          className={cn("flex flex-col gap-2 p-2", className)}
          {...props}
        />
      )
    }

    export function SidebarFooter({ className, ...props }: ComponentProps<"div">) {
      return (
        <div
          data-slot="sidebar-footer"
          data-sidebar="footer"
          className={cn("flex flex-col gap-2 p-2", className)}
          {...props}
        />
      )
    }

    export function SidebarSeparator({
      className,
      ...props
    }: ComponentProps<typeof Separator>) {
      return (
        <Separator
          data-slot="sidebar-separator"
          data-sidebar="separator"
          className={cn("bg-sidebar-border mx-2 w-auto", className)}
          {...props}
        />
      )
    }

    export function SidebarContent({ className, ...props }: ComponentProps<"div">) {
      return (
        <div
          data-slot="sidebar-content"
          data-sidebar="content"
          className={cn(
            "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
            className
          )}
          {...props}
        />
      )
    }

    export function SidebarGroup({ className, ...props }: ComponentProps<"div">) {
      return (
        <div
          data-slot="sidebar-group"
          data-sidebar="group"
          className={cn("relative flex w-full min-w-0 flex-col p-2", className)}
          {...props}
        />
      )
    }