Setup a very basic storybook
This commit is contained in:
parent
8c8eef22ce
commit
045c20844f
15 changed files with 5915 additions and 391 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { getKcContext } from "keycloakify/login";
|
||||
import { createGetKcContext } from "keycloakify/login";
|
||||
|
||||
export type KcContextExtension =
|
||||
// NOTE: A 'keycloakify' field must be added
|
||||
|
|
@ -12,13 +12,11 @@ export type KcContextExtension =
|
|||
| { pageId: "register.ftl"; authorizedMailDomains: string[]; };
|
||||
|
||||
//NOTE: In most of the cases you do not need to overload the KcContext, you can
|
||||
// just call getKcContext(...) without type arguments.
|
||||
// just call createGetKcContext(...) without type arguments.
|
||||
// You want to overload the KcContext only if:
|
||||
// - You have custom plugins that add some values to the context (like https://github.com/micedre/keycloak-mail-whitelisting that adds authorizedMailDomains)
|
||||
// - You want to add support for extra pages that are not yey featured by default, see: https://docs.keycloakify.dev/contributing#adding-support-for-a-new-page
|
||||
export const { kcContext } = getKcContext<KcContextExtension>({
|
||||
// Uncomment to test the login page for development.
|
||||
//mockPageId: "login.ftl",
|
||||
export const { getKcContext } = createGetKcContext<KcContextExtension>({
|
||||
mockData: [
|
||||
{
|
||||
pageId: "login.ftl",
|
||||
|
|
@ -94,4 +92,10 @@ export const { kcContext } = getKcContext<KcContextExtension>({
|
|||
]
|
||||
});
|
||||
|
||||
export const { kcContext } = getKcContext({
|
||||
// Uncomment to test the login page for development.
|
||||
//mockPageId: "login.ftl",
|
||||
});
|
||||
|
||||
|
||||
export type KcContext = NonNullable<typeof kcContext>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue