diff --git a/tslib/react/src/components/PlotHistory.stories.tsx b/tslib/react/src/components/PlotHistory.stories.tsx index 1ef2c643..5e1b278f 100644 --- a/tslib/react/src/components/PlotHistory.stories.tsx +++ b/tslib/react/src/components/PlotHistory.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 { PlotHistory } from "./PlotHistory" const meta: Meta = { component: PlotHistory, - title: "PlotHistory", + title: "Plot/History", 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, + }, +} + +// TODO(c-bata): Add a story for the case where two studies are compared. +// export const CompareStudy: Story = { +// parameters: { +// ... +// }, +// } diff --git a/tslib/react/src/components/PlotHistoryDark.stories.tsx b/tslib/react/src/components/PlotHistoryDark.stories.tsx deleted file mode 100644 index 8a62c1e1..00000000 --- a/tslib/react/src/components/PlotHistoryDark.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 { PlotHistory } from "./PlotHistory" - -const meta: Meta = { - component: PlotHistory, - title: "PlotHistoryDark", - 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, - }, -}