From 8973d941486dd37100eed75427109a5b992916c8 Mon Sep 17 00:00:00 2001
From: Johanna Szepanski <johanna.szepanski@softhouse.se>
Date: Mon, 17 Mar 2025 10:38:04 +0100
Subject: [PATCH] migrated error page story

---
 src/components/common/ErrorPage/ErrorPage.tsx          |  2 +-
 .../{ErrorPage.stories.jsx => ErrorPage.stories.tsx}   | 10 ++++++----
 2 files changed, 7 insertions(+), 5 deletions(-)
 rename src/stories/common/ErrorPage/{ErrorPage.stories.jsx => ErrorPage.stories.tsx} (91%)

diff --git a/src/components/common/ErrorPage/ErrorPage.tsx b/src/components/common/ErrorPage/ErrorPage.tsx
index c56ff124..45c90414 100644
--- a/src/components/common/ErrorPage/ErrorPage.tsx
+++ b/src/components/common/ErrorPage/ErrorPage.tsx
@@ -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;
diff --git a/src/stories/common/ErrorPage/ErrorPage.stories.jsx b/src/stories/common/ErrorPage/ErrorPage.stories.tsx
similarity index 91%
rename from src/stories/common/ErrorPage/ErrorPage.stories.jsx
rename to src/stories/common/ErrorPage/ErrorPage.stories.tsx
index 8fcb53dc..f8f6b498 100644
--- a/src/stories/common/ErrorPage/ErrorPage.stories.jsx
+++ b/src/stories/common/ErrorPage/ErrorPage.stories.tsx
@@ -1,6 +1,8 @@
+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 },
-- 
GitLab