Skip to content

Commit e8dde74

Browse files
committed
Add changeset
1 parent 8b3489f commit e8dde74

3 files changed

Lines changed: 20 additions & 3 deletions

File tree

.changeset/shaky-grapes-add.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@clerk/localizations': patch
3+
'@clerk/clerk-js': patch
4+
'@clerk/shared': patch
5+
'@clerk/ui': patch
6+
---
7+
8+
`<__experimental_ConfigureSSO />` POC for internal testing, not meant for public release

packages/ui/src/components/ConfigureSSO/ConfigureSSO.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const AuthenticatedContent = withCoreUserGuard(() => {
5858
>
5959
<NavbarContextProvider contentRef={contentRef}>
6060
<NavBar
61-
header={
61+
headerAboveTitle={
6262
<Flex
6363
align='center'
6464
sx={t => ({

packages/ui/src/elements/Navbar.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,15 @@ type NavBarProps = {
4949
contentRef: React.RefObject<HTMLDivElement>;
5050
routes: NavbarRoute[];
5151
header?: React.ReactNode;
52+
/**
53+
* Content rendered above the navbar title. Useful when the sidebar
54+
* needs to show context (app + org) before the page title
55+
*/
56+
headerAboveTitle?: React.ReactNode;
5257
};
5358

5459
export const NavBar = (props: NavBarProps) => {
55-
const { contentRef, title, titleSx, description, routes, header } = props;
60+
const { contentRef, title, titleSx, description, routes, header, headerAboveTitle } = props;
5661
const { close } = useNavbarContext();
5762
const { navigate } = useRouter();
5863
const { navigateToFlowStart } = useNavigateToFlowStart();
@@ -129,11 +134,13 @@ export const NavBar = (props: NavBarProps) => {
129134
title={title}
130135
titleSx={titleSx}
131136
description={description}
137+
headerAboveTitle={headerAboveTitle}
132138
>
133139
{header}
134140
{items}
135141
</NavbarContainer>
136142
<MobileNavbarContainer>
143+
{headerAboveTitle}
137144
{header}
138145
{items}
139146
</MobileNavbarContainer>
@@ -146,9 +153,10 @@ const NavbarContainer = (
146153
title: LocalizationKey | string;
147154
titleSx?: ThemableCssProp;
148155
description?: LocalizationKey | string;
156+
headerAboveTitle?: React.ReactNode;
149157
}>,
150158
) => {
151-
const { title, titleSx, description } = props;
159+
const { title, titleSx, description, headerAboveTitle } = props;
152160
return (
153161
<Col
154162
elementDescriptor={descriptors.navbar}
@@ -170,6 +178,7 @@ const NavbarContainer = (
170178
<DevModeOverlay />
171179

172180
<Col sx={t => ({ gap: t.space.$6, flex: `0 0 ${t.space.$60}` })}>
181+
{headerAboveTitle}
173182
<Col
174183
sx={t => ({
175184
gap: t.space.$0x5,

0 commit comments

Comments
 (0)