diff --git a/tslib/react/src/components/TrialTable.stories.tsx b/tslib/react/src/components/TrialTable.stories.tsx index 46774b3d..6749b68c 100644 --- a/tslib/react/src/components/TrialTable.stories.tsx +++ b/tslib/react/src/components/TrialTable.stories.tsx @@ -2,19 +2,20 @@ import { CssBaseline, ThemeProvider } from "@mui/material" import { Meta, StoryObj } from "@storybook/react" import React from "react" import { useMockStudy } from "../MockStudies" +import { darkTheme } from "../styles/darkTheme" import { lightTheme } from "../styles/lightTheme" import { TrialTable } from "./TrialTable" const meta: Meta = { component: TrialTable, - title: "TrialTable", + title: "Table/TrialTable", tags: ["autodocs"], decorators: [ (Story, storyContext) => { const { study } = useMockStudy(storyContext.parameters?.studyId) if (!study) return

loading...

return ( - + = { export default meta type Story = StoryObj -export const MockStudyExample1: Story = { +export const LightTheme: Story = { parameters: { studyId: 1, + theme: lightTheme, + }, +} + +export const DarkTheme: Story = { + parameters: { + studyId: 1, + theme: darkTheme, }, } diff --git a/tslib/react/src/components/TrialTableDark.stories.tsx b/tslib/react/src/components/TrialTableDark.stories.tsx deleted file mode 100644 index 75aa4450..00000000 --- a/tslib/react/src/components/TrialTableDark.stories.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import { CssBaseline, ThemeProvider } from "@mui/material" -import { Meta, StoryObj } from "@storybook/react" -import React from "react" -import { useMockStudy } from "../MockStudies" -import { darkTheme } from "../styles/darkTheme" -import { TrialTable } from "./TrialTable" - -const meta: Meta = { - component: TrialTable, - title: "TrialTableDark", - tags: ["autodocs"], - decorators: [ - (Story, storyContext) => { - const { study } = useMockStudy(storyContext.parameters?.studyId) - if (!study) return

loading...

- return ( - - - - - ) - }, - ], - parameters: { - backgrounds: { default: "dark" }, - }, -} - -export default meta -type Story = StoryObj - -export const MockStudyExample1: Story = { - parameters: { - studyId: 1, - }, -}