Basic storybook setup and update readme
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
|
||||
|
||||
.my-root-class {
|
||||
.my-root-account-class {
|
||||
background: url(./assets/background.svg) no-repeat center center fixed;
|
||||
}
|
@ -13,7 +13,7 @@ const MyExtraPage2 = lazy(() => import("./pages/MyExtraPage2"));
|
||||
const Fallback = lazy(()=> import("keycloakify/account"));
|
||||
|
||||
const classes: PageProps<any, any>["classes"] = {
|
||||
"kcBodyClass": "my-root-class"
|
||||
"kcBodyClass": "my-root-account-class"
|
||||
};
|
||||
|
||||
export default function KcApp(props: { kcContext: KcContext; }) {
|
||||
|
@ -0,0 +1,23 @@
|
||||
//This is to show that you can create stories for pages that you haven't overloaded.
|
||||
|
||||
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
||||
import { createPageStory } from "../createPageStory";
|
||||
|
||||
const { PageStory } = createPageStory({
|
||||
pageId: "login-reset-password.ftl"
|
||||
});
|
||||
|
||||
export default {
|
||||
title: "login/LoginResetPassword",
|
||||
component: PageStory,
|
||||
} as ComponentMeta<typeof PageStory>;
|
||||
|
||||
export const Default: ComponentStory<typeof PageStory> = () => <PageStory />;
|
||||
|
||||
export const WithEmailAsUsername: ComponentStory<typeof PageStory> = () => (
|
||||
<PageStory
|
||||
kcContext={{
|
||||
realm: { loginWithEmailAllowed: true, registrationEmailAsUsername: true }
|
||||
}}
|
||||
/>
|
||||
);
|
13
src/keycloak-theme/login/pages/Terms.stories copy.tsx
Normal file
13
src/keycloak-theme/login/pages/Terms.stories copy.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
||||
import { createPageStory } from "../createPageStory";
|
||||
|
||||
const { PageStory } = createPageStory({
|
||||
pageId: "terms.ftl"
|
||||
});
|
||||
|
||||
export default {
|
||||
title: "login/Terms",
|
||||
component: PageStory,
|
||||
} as ComponentMeta<typeof PageStory>;
|
||||
|
||||
export const Primary: ComponentStory<typeof PageStory> = () => <PageStory />;
|
Reference in New Issue
Block a user