diff options
| author | Maze Winther <mazewinther@gmail.com> | 2025-07-21 21:42:44 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2025-07-21 21:42:44 +0200 |
| commit | ab82db63465de33a6f482ef5007edb9ea544ad2f (patch) | |
| tree | baf88a426a608f0d9a4dc40132ef09a134b7c5f2 /apps/web/src/components/ui | |
| parent | 53d00b72740372f3e3c077dd75ffd1ee8c4a10fd (diff) | |
| download | opencut-ab82db63465de33a6f482ef5007edb9ea544ad2f.tar.gz | |
Merge pull request [#395](https://github.com/mazeincoding/AppCut/issues/395)
Diffstat (limited to 'apps/web/src/components/ui')
| -rw-r--r-- | apps/web/src/components/ui/scroll-area.tsx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/web/src/components/ui/scroll-area.tsx b/apps/web/src/components/ui/scroll-area.tsx index 6b7c3c53..5c9db727 100644 --- a/apps/web/src/components/ui/scroll-area.tsx +++ b/apps/web/src/components/ui/scroll-area.tsx @@ -7,17 +7,22 @@ import { cn } from "../../lib/utils"; const ScrollArea = React.forwardRef< React.ElementRef<typeof ScrollAreaPrimitive.Root>, - React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> ->(({ className, children, ...props }, ref) => ( + React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> & { + type?: "auto" | "always" | "scroll" | "hover"; + showHorizontalScrollbar?: boolean; + } +>(({ className, children, type, showHorizontalScrollbar, ...props }, ref) => ( <ScrollAreaPrimitive.Root ref={ref} className={cn("relative overflow-hidden", className)} + type={type} {...props} > <ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]"> {children} </ScrollAreaPrimitive.Viewport> <ScrollBar /> + {showHorizontalScrollbar && <ScrollBar orientation="horizontal" />} <ScrollAreaPrimitive.Corner /> </ScrollAreaPrimitive.Root> )); |
