Skip to content

Commit 7774ad8

Browse files
committed
feat(clerk-js): Add a themable prop to the wrapper of header content
1 parent 5dc3a36 commit 7774ad8

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

packages/clerk-js/src/ui/components/OrganizationProfile/OrganizationMembers.tsx

+9-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,15 @@ export const OrganizationMembers = withCardStateProvider(() => {
6565
>
6666
<Action.Root animate={false}>
6767
<Animated asChild>
68-
<Header.Root sx={{ flexDirection: 'row', width: '100%', justifyContent: 'space-between' }}>
68+
<Header.Root
69+
contentSx={{
70+
[mqu.md]: {
71+
flexDirection: 'row',
72+
width: '100%',
73+
justifyContent: 'space-between',
74+
},
75+
}}
76+
>
6977
<Header.Title
7078
localizationKey={localizationKeys('organizationProfile.start.headerTitle__members')}
7179
textVariant='h2'

packages/clerk-js/src/ui/elements/Header.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
import React from 'react';
22

33
import { Col, descriptors, Heading, Text, useAppearance } from '../customizables';
4-
import type { PropsOfComponent } from '../styledSystem';
4+
import type { PropsOfComponent, ThemableCssProp } from '../styledSystem';
55
import { ApplicationLogo } from './ApplicationLogo';
66

77
export type HeaderProps = PropsOfComponent<typeof Col> & {
88
showLogo?: boolean;
9+
contentSx?: ThemableCssProp;
910
};
1011

1112
const Root = React.memo(
1213
React.forwardRef<HTMLDivElement, HeaderProps>((props, ref) => {
13-
const { sx, children, gap = 6, showLogo = false, ...rest } = props;
14+
const { sx, children, contentSx, gap = 6, showLogo = false, ...rest } = props;
1415
const appearance = useAppearance();
1516

1617
const logoIsVisible = appearance.parsedLayout.logoPlacement === 'inside' && showLogo;
@@ -26,7 +27,7 @@ const Root = React.memo(
2627
{logoIsVisible && <ApplicationLogo />}
2728
<Col
2829
gap={1}
29-
sx={sx}
30+
sx={contentSx}
3031
{...rest}
3132
>
3233
{children}

0 commit comments

Comments
 (0)