feat: make scroll area type auto for make default visible scrollbar (#3220)

This commit is contained in:
Faisal Amir 2024-08-02 10:59:33 +07:00 committed by GitHub
parent ec9b5bf682
commit 13428d60e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -9,7 +9,7 @@ const ScrollArea = React.forwardRef<
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>
>(({ className, children, onScroll, ...props }, ref) => ( >(({ className, children, onScroll, ...props }, ref) => (
<ScrollAreaPrimitive.Root <ScrollAreaPrimitive.Root
type="scroll" type="auto"
className={twMerge('scroll-area__root', className)} className={twMerge('scroll-area__root', className)}
{...props} {...props}
> >

View File

@ -44,17 +44,17 @@
} }
.scroll-area__bar[data-orientation='vertical'] { .scroll-area__bar[data-orientation='vertical'] {
width: 8px; width: 10px;
} }
.scroll-area__bar[data-orientation='horizontal'] { .scroll-area__bar[data-orientation='horizontal'] {
flex-direction: column; flex-direction: column;
height: 8px; height: 10px;
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 6px; width: 10px;
height: 6px; height: 10px;
} }
::-webkit-scrollbar-track, ::-webkit-scrollbar-track,
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {