2023-04-20 05:41:34 +02:00
|
|
|
import React from "react";
|
|
|
|
import type { ComponentMeta } 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 = "info.ftl";
|
|
|
|
|
|
|
|
const { PageStory } = createPageStory({ pageId });
|
|
|
|
|
|
|
|
const meta: ComponentMeta<any> = {
|
|
|
|
title: `login/${pageId}`,
|
|
|
|
component: PageStory,
|
2024-06-02 22:37:04 +02:00
|
|
|
parameters
|
2023-04-20 05:41:34 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export default meta;
|
|
|
|
|
2023-11-07 16:33:19 +01:00
|
|
|
export const Default = () => (
|
|
|
|
<PageStory
|
|
|
|
kcContext={{
|
|
|
|
message: {
|
2024-06-02 22:29:53 +02:00
|
|
|
summary: "Server info message",
|
2023-11-07 16:33:19 +01:00
|
|
|
type: "info"
|
|
|
|
}
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
);
|
2024-06-02 22:29:53 +02:00
|
|
|
|
|
|
|
export const WithWarning = () => (
|
|
|
|
<PageStory
|
|
|
|
kcContext={{
|
|
|
|
message: {
|
|
|
|
summary: "Server warning message",
|
|
|
|
type: "warning"
|
|
|
|
}
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
|
|
|
|
export const WithError = () => (
|
|
|
|
<PageStory
|
|
|
|
kcContext={{
|
|
|
|
message: {
|
|
|
|
summary: "Server error message",
|
|
|
|
type: "error"
|
|
|
|
}
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
|
|
|
|
export const WithSuccess = () => (
|
|
|
|
<PageStory
|
|
|
|
kcContext={{
|
|
|
|
message: {
|
|
|
|
summary: "Server success message",
|
|
|
|
type: "success"
|
|
|
|
}
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
|
|
|
|
export const WithLinkBack = () => (
|
|
|
|
<PageStory
|
|
|
|
kcContext={{
|
|
|
|
message: {
|
|
|
|
summary: "Server message"
|
|
|
|
},
|
|
|
|
actionUri: undefined
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
|
|
|
|
export const WithRequiredActions = () => (
|
|
|
|
<PageStory
|
|
|
|
kcContext={{
|
|
|
|
message: {
|
|
|
|
summary: "Server message"
|
|
|
|
},
|
|
|
|
requiredActions: ["CONFIGURE_TOTP", "UPDATE_PROFILE", "VERIFY_EMAIL"]
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
);
|