Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/social-icon-button-height.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/ui': patch
---

Fix icon-only social buttons rendering taller than the ones with text. They now size to the same height as the text (block) buttons across all appearance spacing and font-size settings, keeping every social button in a row consistent.
16 changes: 11 additions & 5 deletions packages/ui/src/elements/SocialButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,19 @@ const SocialButtonIcon = forwardRef((props: SocialButtonProps, ref: Ref<HTMLButt
variant='outline'
colorScheme='neutral'
hoverAsFocus
sx={t => ({
minHeight: t.sizes.$8,
width: '100%',
})}
sx={{ width: '100%' }}
{...rest}
>
{icon}
{/* Reserve one line of button text so the icon button matches the height of the
block button (and its siblings) across any theme spacing/font size, instead of
pinning to a static minHeight that stops tracking the text-based controls. */}
<Flex
as='span'
center
sx={{ minHeight: '1lh' }}
>
{icon}
</Flex>
</Button>
);
});
Expand Down
Loading