| 4 | import { cn } from "@/lib/utils" |
| 5 | |
| 6 | function ScrollArea({ |
| 7 | className, |
| 8 | children, |
| 9 | ...props |
| 10 | }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) { |
| 11 | return ( |
| 12 | <ScrollAreaPrimitive.Root |
| 13 | data-slot="scroll-area" |
| 14 | className={cn("relative", className)} |
| 15 | {...props} |
| 16 | > |
| 17 | <ScrollAreaPrimitive.Viewport |
| 18 | data-slot="scroll-area-viewport" |
| 19 | className="size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1" |
| 20 | > |
| 21 | {children} |
| 22 | </ScrollAreaPrimitive.Viewport> |
| 23 | <ScrollBar /> |
| 24 | <ScrollAreaPrimitive.Corner /> |
| 25 | </ScrollAreaPrimitive.Root> |
| 26 | ) |
| 27 | } |
| 28 | |
| 29 | function ScrollBar({ |
| 30 | className, |