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