import React from "react"; import type { Meta, StoryObj } from "@storybook/react"; import { createKcPageStory } from "../KcPageStory"; const { KcPageStory } = createKcPageStory({ pageId: "login-config-totp.ftl" }); const meta = { title: "login/login-config-totp.ftl", component: KcPageStory } satisfies Meta; export default meta; type Story = StoryObj; export const Default: Story = { render: () => }; export const WithManualSetUp: Story = { render: () => ( ) }; export const WithError: Story = { render: () => ( (fieldName === "totp" ? "Invalid TOTP" : undefined), exists: (fieldName: string) => fieldName === "totp", existsError: (fieldName: string) => fieldName === "totp", printIfExists: (fieldName: string, x: T) => (fieldName === "totp" ? x : undefined) } }} /> ) }; export const WithAppInitiatedAction: Story = { render: () => ( ) }; export const WithPreFilledUserLabel: Story = { render: () => ( ) };