Skip to content

Commit 604b65f

Browse files
committed
Introduce specific descriptors for TaskSelectOrganization
1 parent a5af7fc commit 604b65f

File tree

8 files changed

+39
-371
lines changed

8 files changed

+39
-371
lines changed

packages/clerk-js/src/ui/common/organizations/OrganizationPreview.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@ import { SwitchArrowRight } from '../../icons';
1111
import type { ThemableCssProp } from '../../styledSystem';
1212
import { common } from '../../styledSystem';
1313

14-
export const OrganizationPreviewListItems = (props: PropsWithChildren) => {
14+
type OrganizationPreviewListItemsProps = PropsWithChildren<{
15+
elementDescriptor: ElementDescriptor;
16+
}>;
17+
18+
export const OrganizationPreviewListItems = ({ elementDescriptor, children }: OrganizationPreviewListItemsProps) => {
1519
return (
1620
<Col
17-
elementDescriptor={descriptors.organizationListPreviewItems}
21+
elementDescriptor={elementDescriptor}
1822
sx={t => ({
1923
maxHeight: `calc(8 * ${t.sizes.$12})`,
2024
overflowY: 'auto',
@@ -24,7 +28,7 @@ export const OrganizationPreviewListItems = (props: PropsWithChildren) => {
2428
...common.unstyledScrollbar(t),
2529
})}
2630
>
27-
{props.children}
31+
{children}
2832
</Col>
2933
);
3034
};
@@ -42,12 +46,14 @@ export const sharedMainIdentifierSx: ThemableCssProp = t => ({
4246

4347
type OrganizationPreviewListItemProps = PropsWithChildren<{
4448
elementId: React.ComponentProps<typeof OrganizationPreview>['elementId'];
49+
elementDescriptor: React.ComponentProps<typeof OrganizationPreview>['elementDescriptor'];
4550
organizationData: UserOrganizationInvitationResource['publicOrganizationData'];
4651
}>;
4752

4853
export const OrganizationPreviewListItem = ({
4954
children,
5055
elementId,
56+
elementDescriptor,
5157
organizationData,
5258
}: OrganizationPreviewListItemProps) => {
5359
return (
@@ -64,7 +70,7 @@ export const OrganizationPreviewListItem = ({
6470
}),
6571
sharedStyles,
6672
]}
67-
elementDescriptor={descriptors.organizationListPreviewItem}
73+
elementDescriptor={elementDescriptor}
6874
>
6975
<OrganizationPreview
7076
elementId={elementId}

0 commit comments

Comments
 (0)