Remove PlotImportanceDark.stories.tsx

This commit is contained in:
c-bata
2024-08-17 09:43:09 +09:00
parent 1ca00b2486
commit cd31b818c0
4 changed files with 33 additions and 46 deletions
@@ -55,3 +55,10 @@ export const DarkTheme: Story = {
// ...
// },
// }
// TODO(c-bata): Add a story for multi objective study.
// export const MultiObjective: Story = {
// parameters: {
// ...
// },
// }
@@ -51,3 +51,10 @@ export const DarkTheme: Story = {
// ...
// },
// }
// TODO(c-bata): Add a story for multi objective study.
// export const MultiObjective: Story = {
// parameters: {
// ...
// },
// }
@@ -2,12 +2,13 @@ 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 { PlotImportance } from "./PlotImportance"
const meta: Meta<typeof PlotImportance> = {
component: PlotImportance,
title: "PlotImportance",
title: "Plot/Importance",
tags: ["autodocs"],
decorators: [
(Story, storyContext) => {
@@ -16,7 +17,7 @@ const meta: Meta<typeof PlotImportance> = {
)
if (!study) return <p>loading...</p>
return (
<ThemeProvider theme={lightTheme}>
<ThemeProvider theme={storyContext.parameters?.theme}>
<CssBaseline />
<Story
args={{
@@ -33,8 +34,23 @@ const meta: Meta<typeof PlotImportance> = {
export default meta
type Story = StoryObj<typeof PlotImportance>
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 multi objective study.
// export const MultiObjective: Story = {
// parameters: {
// ...
// },
// }
@@ -1,43 +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 { PlotImportance } from "./PlotImportance"
const meta: Meta<typeof PlotImportance> = {
component: PlotImportance,
title: "PlotImportanceDark",
tags: ["autodocs"],
decorators: [
(Story, storyContext) => {
const { study, importance } = useMockStudy(
storyContext.parameters?.studyId
)
if (!study) return <p>loading...</p>
return (
<ThemeProvider theme={darkTheme}>
<CssBaseline />
<Story
args={{
study,
importance,
}}
/>
</ThemeProvider>
)
},
],
parameters: {
backgrounds: { default: "dark" },
},
}
export default meta
type Story = StoryObj<typeof PlotImportance>
export const MockStudyExample1: Story = {
parameters: {
studyId: 1,
},
}