mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-10-30 13:30:17 +08:00
54 lines
1.3 KiB
TypeScript
54 lines
1.3 KiB
TypeScript
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 { PlotParallelCoordinate } from "./PlotParallelCoordinate"
|
|
|
|
const meta: Meta<typeof PlotParallelCoordinate> = {
|
|
component: PlotParallelCoordinate,
|
|
title: "Plot/ParallelCoordinate",
|
|
tags: ["autodocs"],
|
|
decorators: [
|
|
(Story, storyContext) => {
|
|
const { study } = useMockStudy(storyContext.parameters?.studyId)
|
|
if (!study) return <p>loading...</p>
|
|
return (
|
|
<ThemeProvider theme={storyContext.parameters?.theme}>
|
|
<CssBaseline />
|
|
<Story
|
|
args={{
|
|
study,
|
|
}}
|
|
/>
|
|
</ThemeProvider>
|
|
)
|
|
},
|
|
],
|
|
}
|
|
|
|
export default meta
|
|
type Story = StoryObj<typeof PlotParallelCoordinate>
|
|
|
|
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: {
|
|
// ...
|
|
// },
|
|
// }
|