Skip to content

Commit

Permalink
fix(scroll-area): horizontal scroll bar not visible (#1829)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gregermendle authored Nov 12, 2023
1 parent fc3d828 commit 66c7f6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions apps/www/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 apps/www/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

1 comment on commit 66c7f6d

@vercel
Copy link

@vercel vercel bot commented on 66c7f6d Nov 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ui – ./apps/www

ui-shadcn-pro.vercel.app
ui-git-main-shadcn-pro.vercel.app
example-playground.vercel.app
ui.shadcn.com

Please sign in to comment.