Skip to content

Commit

Permalink
chore(clerk-js): Fix misalignment of icons in account switcher (#3108)
Browse files Browse the repository at this point in the history
* chore(clerk-js): Fix misalignment of icons in account switcher

* chore(repo): Add Changeset
  • Loading branch information
octoper authored Apr 4, 2024
1 parent b51d814 commit 976c6a0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/modern-hounds-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': patch
---

Fixes an icon misalignment in account switcher.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ 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}`,
})}
/>
</Card.Action>
</Card.Footer>
Expand Down
13 changes: 10 additions & 3 deletions packages/clerk-js/src/ui/components/UserButton/SessionActions.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import type { ActiveSessionResource } from '@clerk/types';

import type { ThemableCssProp } from '~ui/styledSystem/types';

import type { ElementDescriptor, ElementId } from '../../../ui/customizables/elementDescriptors';
import type { LocalizationKey } from '../../customizables';
import { descriptors, Flex, localizationKeys } from '../../customizables';
Expand Down Expand Up @@ -172,6 +174,7 @@ type SignOutAllActionsProps = {
iconElementDescriptor?: ElementDescriptor;
iconElementId?: ElementId;
label?: LocalizationKey;
sx?: ThemableCssProp;
};

export const SignOutAllActions = (props: SignOutAllActionsProps) => {
Expand All @@ -184,13 +187,17 @@ export const SignOutAllActions = (props: SignOutAllActionsProps) => {
iconElementDescriptor,
iconElementId,
label,
sx,
} = props;
return (
<Actions
role='menu'
sx={t => ({
padding: t.space.$2,
})}
sx={[
t => ({
padding: t.space.$2,
}),
sx,
]}
>
<Action
elementDescriptor={elementDescriptor || descriptors.userButtonPopoverActionButton}
Expand Down

0 comments on commit 976c6a0

Please sign in to comment.