diff options
| author | 2026-02-25 01:32:51 +0800 | |
|---|---|---|
| committer | 2026-02-25 01:32:51 +0800 | |
| commit | 66668d85d603c5841d755a6023aa1925559fc6d4 (patch) | |
| tree | 485464148c76b0021efb55b7d2afd1c3004ceee0 /packages/ui-new/src/components/ui/scroll-area.tsx | |
| parent | a6773bd092db654360c599ca6b0108ea0e456e8c (diff) | |
| download | DropOut-66668d85d603c5841d755a6023aa1925559fc6d4.tar.gz DropOut-66668d85d603c5841d755a6023aa1925559fc6d4.zip | |
chore(workspace): replace legacy codes
Diffstat (limited to 'packages/ui-new/src/components/ui/scroll-area.tsx')
| -rw-r--r-- | packages/ui-new/src/components/ui/scroll-area.tsx | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/packages/ui-new/src/components/ui/scroll-area.tsx b/packages/ui-new/src/components/ui/scroll-area.tsx deleted file mode 100644 index 4a68eb2..0000000 --- a/packages/ui-new/src/components/ui/scroll-area.tsx +++ /dev/null @@ -1,53 +0,0 @@ -"use client"; - -import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area"; -import { cn } from "@/lib/utils"; - -function ScrollArea({ - className, - children, - ...props -}: ScrollAreaPrimitive.Root.Props) { - return ( - <ScrollAreaPrimitive.Root - data-slot="scroll-area" - className={cn("relative", className)} - {...props} - > - <ScrollAreaPrimitive.Viewport - data-slot="scroll-area-viewport" - className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1" - > - {children} - </ScrollAreaPrimitive.Viewport> - <ScrollBar /> - <ScrollAreaPrimitive.Corner /> - </ScrollAreaPrimitive.Root> - ); -} - -function ScrollBar({ - className, - orientation = "vertical", - ...props -}: ScrollAreaPrimitive.Scrollbar.Props) { - return ( - <ScrollAreaPrimitive.Scrollbar - data-slot="scroll-area-scrollbar" - data-orientation={orientation} - orientation={orientation} - className={cn( - "data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent flex touch-none p-px transition-colors select-none", - className, - )} - {...props} - > - <ScrollAreaPrimitive.Thumb - data-slot="scroll-area-thumb" - className="rounded-none bg-border relative flex-1" - /> - </ScrollAreaPrimitive.Scrollbar> - ); -} - -export { ScrollArea, ScrollBar }; |