| 39 | } |
| 40 | |
| 41 | function ScrollBar({ |
| 42 | className, |
| 43 | orientation = "vertical", |
| 44 | ...props |
| 45 | }: ScrollAreaPrimitive.Scrollbar.Props) { |
| 46 | return ( |
| 47 | <ScrollAreaPrimitive.Scrollbar |
| 48 | className={cn( |
| 49 | "m-1 flex opacity-0 transition-opacity delay-300 data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:flex-col data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-100 data-scrolling:duration-100", |
| 50 | className, |
| 51 | )} |
| 52 | data-slot="scroll-area-scrollbar" |
| 53 | orientation={orientation} |
| 54 | {...props} |
| 55 | > |
| 56 | <ScrollAreaPrimitive.Thumb |
| 57 | className="relative flex-1 rounded-full bg-foreground/20" |
| 58 | data-slot="scroll-area-thumb" |
| 59 | /> |
| 60 | </ScrollAreaPrimitive.Scrollbar> |
| 61 | ); |
| 62 | } |
| 63 | |
| 64 | export { ScrollArea, ScrollBar }; |