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/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 = (
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now we're reusing the action that used to be displayed only when there was a __unstable_manageBillingUrl.

<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
Loading