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