Skip to content

Commit

Permalink
fix(scroll-area): horizontal scroll bar not visible (shadcn-ui#1829)
Browse files Browse the repository at this point in the history
PRs shadcn-ui#1515 and shadcn-ui#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
  • Loading branch information
gregermendle authored Nov 12, 2023
1 parent 032a62b commit 0f8539e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions registry/default/ui/scroll-area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
))
Expand Down
5 changes: 1 addition & 4 deletions registry/new-york/ui/scroll-area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
))
Expand Down

0 comments on commit 0f8539e

Please sign in to comment.