File tree Expand file tree Collapse file tree 4 files changed +11
-2
lines changed
clerk-js/src/ui/components/OrganizationSwitcher Expand file tree Collapse file tree 4 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @clerk/clerk-js ' : patch
3+ ' @clerk/types ' : patch
4+ ---
5+
6+ Add descriptor ids to ` UserMembershipList ` and ` OrganizationSwitcherTrigger ` elements to improve styling experience.
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ export const OrganizationSwitcherTrigger = withAvatarShimmer(
3030 return (
3131 < Button
3232 elementDescriptor = { descriptors . organizationSwitcherTrigger }
33+ elementId = { descriptors . organizationSwitcherTrigger . setId ( organization ? 'organization' : 'personal' ) }
3334 variant = 'ghost'
3435 colorScheme = 'neutral'
3536 hoverAsFocus
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ export const UserMembershipList = (props: UserMembershipListProps) => {
7777 { currentOrg && ! hidePersonal && (
7878 < PreviewButton
7979 elementDescriptor = { descriptors . organizationSwitcherPreviewButton }
80+ elementId = { descriptors . organizationSwitcherPreviewButton . setId ( 'personal' ) }
8081 icon = { SwitchArrowRight }
8182 onClick = { onPersonalWorkspaceClick }
8283 role = 'menuitem'
@@ -92,6 +93,7 @@ export const UserMembershipList = (props: UserMembershipListProps) => {
9293 < PreviewButton
9394 key = { organization . id }
9495 elementDescriptor = { descriptors . organizationSwitcherPreviewButton }
96+ elementId = { descriptors . organizationSwitcherPreviewButton . setId ( 'organization' ) }
9597 icon = { SwitchArrowRight }
9698 onClick = { ( ) => onOrganizationClick ( organization ) }
9799 role = 'menuitem'
Original file line number Diff line number Diff line change @@ -312,7 +312,7 @@ export type ElementsConfig = {
312312 userButtonPopoverFooter : WithOptions ;
313313 userButtonPopoverFooterPagesLink : WithOptions < 'terms' | 'privacy' > ;
314314
315- organizationSwitcherTrigger : WithOptions < never , 'open' > ;
315+ organizationSwitcherTrigger : WithOptions < 'personal' | 'organization' , 'open' > ;
316316 organizationSwitcherTriggerIcon : WithOptions < never , 'open' > ;
317317 organizationSwitcherPopoverRootBox : WithOptions ;
318318 organizationSwitcherPopoverCard : WithOptions ;
@@ -323,7 +323,7 @@ export type ElementsConfig = {
323323 organizationSwitcherPopoverActionButton : WithOptions <
324324 'manageOrganization' | 'createOrganization' | 'switchOrganization'
325325 > ;
326- organizationSwitcherPreviewButton : WithOptions ;
326+ organizationSwitcherPreviewButton : WithOptions < 'personal' | 'organization' > ;
327327 organizationSwitcherInvitationAcceptButton : WithOptions ;
328328 organizationSwitcherPopoverActionButtonIconBox : WithOptions < 'manageOrganization' | 'createOrganization' > ;
329329 organizationSwitcherPopoverActionButtonIcon : WithOptions < 'manageOrganization' | 'createOrganization' > ;
You can’t perform that action at this time.
0 commit comments