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-09 11:53:25 +02:00
|
|
|
import { createKcPageStory } from "../KcPageStory";
|
2023-04-20 05:41:34 +02:00
|
|
|
|
2024-06-09 11:53:25 +02:00
|
|
|
const { KcPageStory } = createKcPageStory({ pageId: "info.ftl" });
|
2023-04-20 05:41:34 +02:00
|
|
|
|
2024-06-03 00:11:19 +02:00
|
|
|
const meta = {
|
2024-06-06 07:28:34 +02:00
|
|
|
title: "login/info.ftl",
|
2024-06-09 11:53:25 +02:00
|
|
|
component: KcPageStory
|
|
|
|
} satisfies Meta<typeof KcPageStory>;
|
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: () => (
|
2024-06-09 11:53:25 +02:00
|
|
|
<KcPageStory
|
2024-06-03 00:11:19 +02:00
|
|
|
kcContext={{
|
2024-11-19 03:22:49 +01:00
|
|
|
messageHeader: "Message header",
|
2024-06-03 00:11:19 +02:00
|
|
|
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: () => (
|
2024-06-09 11:53:25 +02:00
|
|
|
<KcPageStory
|
2024-06-03 00:11:19 +02:00
|
|
|
kcContext={{
|
2024-11-19 03:22:49 +01:00
|
|
|
messageHeader: "Message header",
|
2024-06-03 00:11:19 +02:00
|
|
|
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: () => (
|
2024-06-09 11:53:25 +02:00
|
|
|
<KcPageStory
|
2024-06-03 00:11:19 +02:00
|
|
|
kcContext={{
|
2024-11-19 03:22:49 +01:00
|
|
|
messageHeader: "Message header",
|
2024-06-03 00:11:19 +02:00
|
|
|
message: {
|
2025-03-21 11:37:08 +01:00
|
|
|
summary: "Required actions:"
|
2024-06-03 00:11:19 +02:00
|
|
|
},
|
2024-07-10 22:18:24 +02:00
|
|
|
requiredActions: ["CONFIGURE_TOTP", "UPDATE_PROFILE", "VERIFY_EMAIL", "CUSTOM_ACTION"],
|
|
|
|
"x-keycloakify": {
|
|
|
|
messages: {
|
|
|
|
"requiredAction.CUSTOM_ACTION": "Custom action"
|
|
|
|
}
|
|
|
|
}
|
2024-06-03 00:11:19 +02:00
|
|
|
}}
|
|
|
|
/>
|
|
|
|
)
|
|
|
|
};
|