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/violet-buckets-taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': patch
---

Align action buttons with user preview in `<UserButton/>`
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ const _SignInAccountSwitcher = () => {
iconElementDescriptor={descriptors.accountSwitcherActionButtonIcon}
iconElementId={descriptors.accountSwitcherActionButtonIcon.setId('signOutAll')}
label={localizationKeys('signIn.accountSwitcher.action__signOutAll')}
sx={t => ({
padding: `${t.space.$2} ${t.space.$1x5}`,
actionSx={t => ({
padding: `${t.space.$2} ${t.space.$2}`,
})}
/>
</Card.Action>
Expand Down
17 changes: 11 additions & 6 deletions packages/clerk-js/src/ui/components/UserButton/SessionActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ type SignOutAllActionsProps = {
iconElementId?: ElementId;
label?: LocalizationKey;
sx?: ThemableCssProp;
actionSx?: ThemableCssProp;
};

export const SignOutAllActions = (props: SignOutAllActionsProps) => {
Expand All @@ -187,6 +188,7 @@ export const SignOutAllActions = (props: SignOutAllActionsProps) => {
iconElementId,
label,
sx,
actionSx,
} = props;
return (
<Actions
Expand All @@ -210,12 +212,15 @@ export const SignOutAllActions = (props: SignOutAllActionsProps) => {
onClick={handleSignOutAllClicked}
variant='ghost'
colorScheme='neutral'
sx={t => ({
backgroundColor: t.colors.$transparent,
padding: `${t.space.$2} ${t.space.$3}`,
borderBottomWidth: 0,
borderRadius: t.radii.$lg,
})}
sx={[
t => ({
backgroundColor: t.colors.$transparent,
padding: `${t.space.$2} ${t.space.$3}`,
borderBottomWidth: 0,
borderRadius: t.radii.$lg,
}),
actionSx,
]}
spinnerSize='md'
/>
</Actions>
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/ui/elements/Actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export const Action = (props: ActionProps) => {
t => ({
flex: '1',
borderRadius: 0,
gap: t.space.$3,
gap: t.space.$4,
justifyContent: 'flex-start',
}),
sx,
Expand Down