import React from "react"; import type { Meta, StoryObj } from "@storybook/react"; import { createKcPageStory } from "../KcPageStory"; import type { Attribute } from "../../../dist/login"; const { KcPageStory } = createKcPageStory({ pageId: "register.ftl" }); const meta = { title: "login/register.ftl", component: KcPageStory } satisfies Meta; export default meta; type Story = StoryObj; export const Default: Story = { render: () => }; export const WithEmailAlreadyExists: Story = { render: () => ( [fieldName, ...otherFieldNames].includes("email"), get: (fieldName: string) => (fieldName === "email" ? "Email already exists." : undefined) } }} /> ) }; export const WithRestrictedToMITStudents: Story = { render: () => ( @mit.edu) nor a Berkeley (@berkeley.edu) email." } } }} /> ) }; export const WithFavoritePet: Story = { render: () => ( ) }; export const WithNewsletter: Story = { render: () => ( ) }; export const WithEmailAsUsername: Story = { render: () => ( ) }; export const WithRecaptcha: Story = { render: () => ( ) }; export const WithRecaptchaFrench: Story = { render: () => ( ) }; export const WithPasswordMinLength8: Story = { render: () => ( ) }; export const WithTermsAcceptance: Story = { render: () => ( Service Terms of Use" } } }} /> ) };