-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(clerk-js,types,localizations): Render "Restricted access" screen…
… SignUp component when signup.mode is restricted
- Loading branch information
1 parent
f1f17ea
commit 12963e8
Showing
9 changed files
with
106 additions
and
2 deletions.
There are no files selected for viewing
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,7 @@ | ||
--- | ||
"@clerk/localizations": minor | ||
"@clerk/clerk-js": minor | ||
"@clerk/types": minor | ||
--- | ||
|
||
Render "Restricted access" screen in `<SignUp />` component when `signup.mode` in `userSettings` is `restricted` |
37 changes: 37 additions & 0 deletions
37
packages/clerk-js/src/ui/components/SignUp/SignUpRestrictedAccess.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,37 @@ | ||
import { useClerk } from '@clerk/shared/react'; | ||
|
||
import { useSignUpContext } from '../../contexts'; | ||
import { Icon, localizationKeys } from '../../customizables'; | ||
import { Card, Header } from '../../elements'; | ||
import { Block } from '../../icons'; | ||
|
||
export const SignUpRestrictedAccess = () => { | ||
const clerk = useClerk(); | ||
const { signInUrl } = useSignUpContext(); | ||
|
||
return ( | ||
<Card.Root> | ||
<Card.Content> | ||
<Header.Root showLogo> | ||
<Icon | ||
icon={Block} | ||
sx={t => ({ | ||
margin: 'auto', | ||
width: t.sizes.$12, | ||
height: t.sizes.$12, | ||
})} | ||
/> | ||
<Header.Title localizationKey={localizationKeys('signUp.restrictedAccess.title')} /> | ||
<Header.Subtitle localizationKey={localizationKeys('signUp.restrictedAccess.subtitle')} /> | ||
</Header.Root> | ||
<Card.Action elementId='signUp'> | ||
<Card.ActionLink | ||
localizationKey={localizationKeys('signUp.restrictedAccess.actionLink')} | ||
to={clerk.buildUrlWithAuth(signInUrl)} | ||
/> | ||
</Card.Action> | ||
</Card.Content> | ||
<Card.Footer /> | ||
</Card.Root> | ||
); | ||
}; |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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