Skip to content

Commit

Permalink
chore(clerk-js): Update OrganizationSwitcher popover action to incl…
Browse files Browse the repository at this point in the history
…ude label (#4304)
  • Loading branch information
LauraBeatris authored Oct 9, 2024
1 parent 68720e1 commit e50ce1b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .changeset/lemon-terms-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clerk/clerk-js": patch
---

Update `OrganizationSwitcher` popover action to include label
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { useEnvironment, useOrganizationSwitcherContext } from '../../contexts';
import { descriptors, Flex, localizationKeys } from '../../customizables';
import {
Actions,
ExtraSmallAction,
OrganizationPreview,
PersonalWorkspacePreview,
PopoverCard,
Expand Down Expand Up @@ -105,20 +104,6 @@ export const OrganizationSwitcherPopover = React.forwardRef<HTMLDivElement, Orga
});
};

const manageOrganizationSmallIconButton = (
<ExtraSmallAction
elementDescriptor={descriptors.organizationSwitcherPopoverActionButton}
elementId={descriptors.organizationSwitcherPopoverActionButton.setId('manageOrganization')}
iconBoxElementDescriptor={descriptors.organizationSwitcherPopoverActionButtonIconBox}
iconBoxElementId={descriptors.organizationSwitcherPopoverActionButtonIconBox.setId('manageOrganization')}
iconElementDescriptor={descriptors.organizationSwitcherPopoverActionButtonIcon}
iconElementId={descriptors.organizationSwitcherPopoverActionButtonIcon.setId('manageOrganization')}
icon={CogFilled}
onClick={() => handleItemClick()}
trailing={<NotificationCountBadgeManageButton />}
/>
);

const manageOrganizationButton = (
<SmallAction
elementDescriptor={descriptors.organizationSwitcherPopoverActionButton}
Expand Down Expand Up @@ -195,7 +180,7 @@ export const OrganizationSwitcherPopover = React.forwardRef<HTMLDivElement, Orga
padding: `${t.space.$4} ${t.space.$5}`,
})}
/>
<Actions role='menu'>{manageOrganizationSmallIconButton}</Actions>
<Actions role='menu'>{manageOrganizationButton}</Actions>
</Flex>
);

Expand Down

0 comments on commit e50ce1b

Please sign in to comment.