-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
75a5b7f
commit 70c895d
Showing
4 changed files
with
134 additions
and
10 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import { ComponentStory, ComponentMeta } from '@storybook/react'; | ||
import { createPageStory } from "../createPageStory"; | ||
|
||
const { PageStory } = createPageStory({ | ||
pageId: "register.ftl" | ||
}); | ||
|
||
export default { | ||
title: "register/Register", | ||
component: PageStory, | ||
} as ComponentMeta<typeof PageStory>; | ||
|
||
export const Default: ComponentStory<typeof PageStory> = () => <PageStory />; | ||
|
||
export const WithoutEmailField: ComponentStory<typeof PageStory> = () => ( | ||
<PageStory | ||
kcContext={{ | ||
register: { email: false } | ||
}} | ||
/> | ||
); | ||
|
||
export const WithoutPasswordField: ComponentStory<typeof PageStory> = () => ( | ||
<PageStory | ||
kcContext={{ | ||
passwordRequired: false | ||
}} | ||
/> | ||
); | ||
|
||
export const WithRecaptcha: ComponentStory<typeof PageStory> = () => ( | ||
<PageStory | ||
kcContext={{ | ||
recaptchaRequired: true, | ||
recaptchaSiteKey: "your-recaptcha-site-key" | ||
}} | ||
/> | ||
); | ||
|
||
export const WithPresetFirstName: ComponentStory<typeof PageStory> = () => ( | ||
<PageStory | ||
kcContext={{ | ||
register: { formData: { firstName: "John" } } | ||
}} | ||
/> | ||
); | ||
|
||
export const WithPresetLastName: ComponentStory<typeof PageStory> = () => ( | ||
<PageStory | ||
kcContext={{ | ||
register: { formData: { lastName: "Doe" } } | ||
}} | ||
/> | ||
); | ||
|
||
export const WithPresetEmail: ComponentStory<typeof PageStory> = () => ( | ||
<PageStory | ||
kcContext={{ | ||
register: { formData: { email: "[email protected]" } } | ||
}} | ||
/> | ||
); | ||
|
||
export const WithPresetUsername: ComponentStory<typeof PageStory> = () => ( | ||
<PageStory | ||
kcContext={{ | ||
register: { formData: { username: "johndoe" } } | ||
}} | ||
/> | ||
); | ||
|
||
// Add more variations as needed... |
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