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-05 21:44:26 +02:00
|
|
|
import { createPageStory, parameters } from "../PageStory";
|
2023-04-20 05:41:34 +02:00
|
|
|
|
|
|
|
const pageId = "info.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
|
|
|
|
kcContext={{
|
|
|
|
message: {
|
2024-06-03 23:40:21 +02:00
|
|
|
summary: "Server info message"
|
2024-06-03 00:11:19 +02:00
|
|
|
}
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
)
|
|
|
|
};
|
2024-06-02 22:29:53 +02:00
|
|
|
|
2024-06-03 00:11:19 +02:00
|
|
|
export const WithLinkBack: Story = {
|
|
|
|
render: () => (
|
|
|
|
<PageStory
|
|
|
|
kcContext={{
|
|
|
|
message: {
|
|
|
|
summary: "Server message"
|
|
|
|
},
|
|
|
|
actionUri: undefined
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
)
|
|
|
|
};
|
2024-06-02 22:29:53 +02:00
|
|
|
|
2024-06-03 00:11:19 +02:00
|
|
|
export const WithRequiredActions: Story = {
|
|
|
|
render: () => (
|
|
|
|
<PageStory
|
|
|
|
kcContext={{
|
|
|
|
message: {
|
|
|
|
summary: "Server message"
|
|
|
|
},
|
|
|
|
requiredActions: ["CONFIGURE_TOTP", "UPDATE_PROFILE", "VERIFY_EMAIL"]
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
)
|
|
|
|
};
|