-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(clerk-js): Add navbar menu for mobile on custom pages
- Loading branch information
Showing
3 changed files
with
32 additions
and
4 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
packages/clerk-js/src/ui/common/CustomPageContentContainer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Col, descriptors } from '../customizables'; | ||
import { CardAlert, NavbarMenuButtonRow, useCardState, withCardStateProvider } from '../elements'; | ||
import type { CustomPageContent } from '../utils'; | ||
import { ExternalElementMounter } from '../utils'; | ||
|
||
export const CustomPageContentContainer = withCardStateProvider( | ||
({ mount, unmount }: Omit<CustomPageContent, 'url'>) => { | ||
const card = useCardState(); | ||
return ( | ||
<Col | ||
elementDescriptor={descriptors.page} | ||
gap={8} | ||
> | ||
<CardAlert>{card.error}</CardAlert> | ||
<NavbarMenuButtonRow /> | ||
<Col | ||
elementDescriptor={descriptors.profilePage} | ||
gap={8} | ||
> | ||
<ExternalElementMounter | ||
mount={mount} | ||
unmount={unmount} | ||
/> | ||
</Col> | ||
</Col> | ||
); | ||
}, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters