Files
optuna-dashboard/tslib/react/src/components/TrialTable.stories.tsx
T

38 lines
902 B
TypeScript

import { CssBaseline, ThemeProvider } from "@mui/material"
import { Meta, StoryObj } from "@storybook/react"
import React from "react"
import { useMockStudy } from "../MockStudies"
import { lightTheme } from "../styles/lightTheme"
import { TrialTable } from "./TrialTable"
const meta: Meta<typeof TrialTable> = {
component: TrialTable,
title: "TrialTable",
tags: ["autodocs"],
decorators: [
(Story, storyContext) => {
const study = useMockStudy(storyContext.parameters?.studyId)
if (!study) return <p>loading...</p>
return (
<ThemeProvider theme={lightTheme}>
<CssBaseline />
<Story
args={{
study,
}}
/>
</ThemeProvider>
)
},
],
}
export default meta
type Story = StoryObj<typeof TrialTable>
export const MockStudyExample1: Story = {
parameters: {
studyId: 1,
},
}