More homogeneous storybook setup
This commit is contained in:
@ -1,25 +1,31 @@
|
||||
import React from "react";
|
||||
import type { ComponentMeta } from "@storybook/react";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
import { createPageStory, parameters } from "../createPageStory";
|
||||
|
||||
const pageId = "error.ftl";
|
||||
|
||||
const { PageStory } = createPageStory({ pageId });
|
||||
|
||||
const meta: ComponentMeta<any> = {
|
||||
const meta = {
|
||||
title: `login/${pageId}`,
|
||||
component: PageStory,
|
||||
parameters
|
||||
};
|
||||
} satisfies Meta<typeof PageStory>;
|
||||
|
||||
export default meta;
|
||||
|
||||
export const Default = () => <PageStory />;
|
||||
type Story = StoryObj<typeof meta>;
|
||||
|
||||
export const WithAnotherMessage = () => (
|
||||
<PageStory
|
||||
kcContext={{
|
||||
message: { summary: "With another error message" }
|
||||
}}
|
||||
/>
|
||||
);
|
||||
export const Default: Story = {
|
||||
render: () => <PageStory />
|
||||
};
|
||||
|
||||
export const WithAnotherMessage: Story = {
|
||||
render: () => (
|
||||
<PageStory
|
||||
kcContext={{
|
||||
message: { summary: "With another error message" }
|
||||
}}
|
||||
/>
|
||||
)
|
||||
};
|
||||
|
Reference in New Issue
Block a user