fix(scroll-area): horizontal scroll bar not visible (#1829)

PRs #1515 and #1296 interfere with each other and cause the horizontal scroll bar to not be visible. This removes the conditional `flex-1`, however you could also remove `flex-col` to achieve the same result.

before:

https://github.com/shadcn-ui/ui/assets/9381099/6514de2e-e353-4d0b-bd24-aff79e0d5161

after:


https://github.com/shadcn-ui/ui/assets/9381099/3205baad-569b-4096-8dcd-9beb794de536
This commit is contained in:
Greg
2023-11-12 02:36:35 -05:00
committed by GitHub
parent fc3d8288f7
commit 66c7f6d73b
2 changed files with 2 additions and 8 deletions

View File

@@ -41,10 +41,7 @@ const ScrollBar = React.forwardRef<
{...props}
>
<ScrollAreaPrimitive.ScrollAreaThumb
className={cn(
"relative rounded-full bg-border",
orientation === "vertical" && "flex-1"
)}
className="relative flex-1 rounded-full bg-border"
/>
</ScrollAreaPrimitive.ScrollAreaScrollbar>
))

View File

@@ -41,10 +41,7 @@ const ScrollBar = React.forwardRef<
{...props}
>
<ScrollAreaPrimitive.ScrollAreaThumb
className={cn(
"relative rounded-full bg-border",
orientation === "vertical" && "flex-1"
)}
className="relative flex-1 rounded-full bg-border"
/>
</ScrollAreaPrimitive.ScrollAreaScrollbar>
))