Skip to content

Commit

Permalink
fix(scroll-area): added conditional flex-1 (#1296)
Browse files Browse the repository at this point in the history
  • Loading branch information
SoyDiego authored Sep 25, 2023
1 parent 4f8d768 commit 1f16cf4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion apps/www/registry/default/ui/scroll-area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ const ScrollBar = React.forwardRef<
)}
{...props}
>
<ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-border" />
<ScrollAreaPrimitive.ScrollAreaThumb
className={cn(
"relative rounded-full bg-border",
orientation === "vertical" && "flex-1"
)}
/>
</ScrollAreaPrimitive.ScrollAreaScrollbar>
))
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName
Expand Down
7 changes: 6 additions & 1 deletion apps/www/registry/new-york/ui/scroll-area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ const ScrollBar = React.forwardRef<
)}
{...props}
>
<ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-border" />
<ScrollAreaPrimitive.ScrollAreaThumb
className={cn(
"relative rounded-full bg-border",
orientation === "vertical" && "flex-1"
)}
/>
</ScrollAreaPrimitive.ScrollAreaScrollbar>
))
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName
Expand Down

1 comment on commit 1f16cf4

@vercel
Copy link

@vercel vercel bot commented on 1f16cf4 Sep 25, 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

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

Please sign in to comment.