Skip to content
Snippets Groups Projects
Commit 8973d941 authored by Johanna Szepanski's avatar Johanna Szepanski
Browse files

migrated error page story

parent f24f8615
No related branches found
No related tags found
1 merge request!222CE-3635: Migrate errorpage and links
Pipeline #219651 passed
......@@ -16,7 +16,7 @@ import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
import { ExternalButtonLink, InternalButtonLink } from "../Link";
import { theme } from "../../../style/Theme";
interface ErrorPageProps {
export interface ErrorPageProps {
title: string;
subtitle: string;
details?: string;
......
import { Meta } from "@storybook/react";
import { Button, Paper } from "@mui/material";
import { BrowserRouter } from "react-router-dom";
import { ErrorPage } from "../../../components/common/ErrorPage";
import { ErrorPageProps } from "../../../components/common/ErrorPage/ErrorPage";
import { theme } from "../../../style/Theme";
import {
SidewaysMascot,
......@@ -10,9 +12,9 @@ import {
export default {
title: "Common/ErrorPage",
component: ErrorPage
};
} as Meta<typeof ErrorPage>;
const Template = (props) => {
const Template = (props: ErrorPageProps) => {
return (
<BrowserRouter>
<Paper sx={{ padding: 2 }}>
......@@ -24,7 +26,7 @@ const Template = (props) => {
const mascotDefaultProps = { width: "250px", height: "500px" };
export const Default = (args) => <Template {...args} />;
export const Default = (args: ErrorPageProps) => <Template {...args} />;
Default.args = {
title: "Badger Ducks Summoned",
subtitle: "HTTP 503",
......@@ -71,7 +73,7 @@ Suppressed: com.physics.particles.PauliExclusionFreakoutException: Pauli exclusi
`
};
export const Customized = (args) => <Template {...args} />;
export const Customized = (args: ErrorPageProps) => <Template {...args} />;
Customized.args = {
...Default.args,
titleProps: { variant: "h1", color: theme.palette.error.main },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment