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
9 changes: 9 additions & 0 deletions .changeset/wise-lions-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@clerk/clerk-js': major
'@clerk/types': patch
---

Introducing some changes and some addition for the appearence descriptors for the organization preview in `<OrganizationSwitcher/>`:
- `.cl-organizationPreview__organizationSwitcher` has been renamed to `.cl-organizationPreview__organizationSwitcherTrigger`.
- `.cl-organizationPreview__organizationSwitcherListedOrganization` was added to allow you to customize the appearance of all the listed organization previews.
- `.cl-organizationPreview__organizationSwitcherActiveOrganizationn` was added to allow you to customize the appearance of the active organization.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export const OrganizationSwitcherPopover = React.forwardRef<HTMLDivElement, Orga
{currentOrg ? (
<>
<OrganizationPreview
elementId={'organizationSwitcher'}
elementId={'organizationSwitcherActiveOrganization'}
gap={4}
organization={currentOrg}
user={user}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const OrganizationSwitcherTrigger = withAvatarShimmer(
>
{organization && (
<OrganizationPreview
elementId={'organizationSwitcher'}
elementId={'organizationSwitcherTrigger'}
gap={3}
size={'sm'}
organization={organization}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const InvitationPreview = withCardStateProvider(
})}
>
<OrganizationPreview
elementId='organizationSwitcher'
elementId='organizationSwitcherListedOrganization'
avatarSx={t => ({ margin: `0 calc(${t.space.$3}/2)` })}
organization={publicOrganizationData}
size='sm'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const UserMembershipList = (props: UserMembershipListProps) => {
role='menuitem'
>
<OrganizationPreview
elementId='organizationSwitcher'
elementId='organizationSwitcherListedOrganization'
avatarSx={t => ({ margin: `0 calc(${t.space.$3}/2)` })}
organization={organization}
size='sm'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export const OrganizationSwitcherPopover = React.forwardRef<HTMLDivElement, Orga
{currentOrg ? (
<>
<OrganizationPreview
elementId={'organizationSwitcher'}
elementId={'organizationSwitcherActiveOrganization'}
gap={4}
organization={currentOrg}
user={user}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const OrganizationSwitcherTrigger = withAvatarShimmer(
>
{organization && (
<OrganizationPreview
elementId={'organizationSwitcher'}
elementId={'organizationSwitcherTrigger'}
gap={3}
size={'sm'}
organization={organization}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const InvitationPreview = withCardStateProvider(
})}
>
<OrganizationPreview
elementId='organizationSwitcher'
elementId='organizationSwitcherListedOrganization'
avatarSx={t => ({ margin: `0 calc(${t.space.$3}/2)` })}
organization={publicOrganizationData}
size='sm'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const UserMembershipList = (props: UserMembershipListProps) => {
role='menuitem'
>
<OrganizationPreview
elementId='organizationSwitcher'
elementId='organizationSwitcherListedOrganization'
avatarSx={t => ({ margin: `0 calc(${t.space.$3}/2)` })}
organization={organization}
size='sm'
Expand Down
6 changes: 5 additions & 1 deletion packages/types/src/elementIds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ export type ProfileSectionId =
export type ProfilePageId = 'account' | 'security' | 'organizationSettings' | 'organizationMembers';

export type UserPreviewId = 'userButton' | 'personalWorkspace';
export type OrganizationPreviewId = 'organizationSwitcher' | 'organizationList';
export type OrganizationPreviewId =
| 'organizationSwitcherTrigger'
| 'organizationList'
| 'organizationSwitcherListedOrganization'
| 'organizationSwitcherActiveOrganization';

export type FooterActionId = 'havingTrouble' | 'alternativeMethods' | 'signUp' | 'signIn';

Expand Down