Skip to content

Commit

Permalink
Merge pull request #935 from c-bata/storybook-improvement
Browse files Browse the repository at this point in the history
Remove `*Dark.stories.tsx` and add some improvements
  • Loading branch information
c-bata authored Aug 19, 2024
2 parents 8bbbd81 + c42f838 commit a0dd548
Show file tree
Hide file tree
Showing 21 changed files with 5,377 additions and 8,499 deletions.
17 changes: 9 additions & 8 deletions optuna_dashboard/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions standalone_app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions tslib/react/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ import type { StorybookConfig } from "@storybook/react-vite"

const config: StorybookConfig = {
stories: ["../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],

addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"@chromatic-com/storybook",
],

framework: {
name: "@storybook/react-vite",
options: {},
},
docs: {
autodocs: "tag",
},

async viteFinal(config) {
const { mergeConfig } = await import("vite")
return mergeConfig(config, {
Expand All @@ -25,5 +26,9 @@ const config: StorybookConfig = {
},
})
},

typescript: {
reactDocgen: "react-docgen-typescript",
},
}
export default config
14 changes: 0 additions & 14 deletions tslib/react/.storybook/preview.ts

This file was deleted.

32 changes: 32 additions & 0 deletions tslib/react/.storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import {
Controls,
Description,
Primary,
Subtitle,
Title,
} from "@storybook/blocks"
import type { Preview } from "@storybook/react"

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
docs: {
page: () => (
<>
<Title />
<Subtitle />
<Description />
<Primary />
<Controls />
</>
),
},
},
}

export default preview
Loading

0 comments on commit a0dd548

Please sign in to comment.