keycloak_theme/stories/login/pages/SelectAuthenticator.stories.tsx

47 lines
1.5 KiB
TypeScript
Raw Normal View History

2023-04-20 05:41:34 +02:00
import React from "react";
2024-06-03 00:11:19 +02:00
import type { Meta, StoryObj } from "@storybook/react";
2024-06-02 22:37:04 +02:00
import { createPageStory, parameters } from "../createPageStory";
2023-04-20 05:41:34 +02:00
const pageId = "select-authenticator.ftl";
const { PageStory } = createPageStory({ pageId });
2024-06-03 00:11:19 +02:00
const meta = {
2023-04-20 05:41:34 +02:00
title: `login/${pageId}`,
component: PageStory,
2024-06-02 22:37:04 +02:00
parameters
2024-06-03 00:11:19 +02:00
} satisfies Meta<typeof PageStory>;
2023-04-20 05:41:34 +02:00
export default meta;
2024-06-03 00:11:19 +02:00
type Story = StoryObj<typeof meta>;
export const Default: Story = {
render: () => <PageStory />
};
2024-06-03 00:11:19 +02:00
export const WithDifferentAuthenticationMethods: Story = {
render: () => (
<PageStory
kcContext={{
auth: {
authenticationSelections: [
{
authExecId: "25697c4e-0c80-4f2c-8eb7-2c16347e8e8d",
displayName: "auth-username-password-form-display-name",
helpText: "auth-username-password-form-help-text",
iconCssClass: "kcAuthenticatorPasswordClass"
},
{
authExecId: "4cb60872-ce0d-4c8f-a806-e651ed77994b",
displayName: "webauthn-passwordless-display-name",
helpText: "webauthn-passwordless-help-text",
iconCssClass: "kcAuthenticatorWebAuthnPasswordlessClass"
}
]
}
}}
/>
)
};