Skip to content

Commit

Permalink
refactor(storybook): refactor storybook configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
JanSzewczyk committed May 28, 2024
1 parent 76d1db1 commit 1e8e6d5
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 31 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: anc95/ChatGPT-CodeReview@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
3 changes: 0 additions & 3 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ export default {
reactDocgen: "react-docgen-typescript",
check: true
},
docs: {
autodocs: true
},
viteFinal: async (config) => {
return mergeConfig(config, {
plugins: [tsConfigPaths()]
Expand Down
53 changes: 28 additions & 25 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,35 @@ import lightTheme from "./theme/light";
import "../src/theme/global.css";

import { DocsContainer } from "./components/DocsContainer";
import { Preview } from "@storybook/react";

export const parameters = {
darkMode: {
current: "light",
classTarget: "html",
stylePreview: true,
// Override the default dark theme
dark: darkTheme,
// Override the default light theme
light: lightTheme
},
actions: { argTypesRegex: "^on[A-Z].*" },
backgrounds: { disable: true },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/
}
},
docs: {
export default {
parameters: {
actions: { argTypesRegex: "^on[A-Z].*" },
backgrounds: { disable: true },
controls: {
sort: "requiredFirst"
matchers: {
color: /(background|color)$/i,
date: /Date$/
}
},
darkMode: {
classTarget: "html",
current: "light",
stylePreview: true,
// Override the default dark theme
dark: darkTheme,
// Override the default light theme
light: lightTheme
},
container: DocsContainer
docs: {
controls: {
sort: "requiredFirst"
},
container: DocsContainer
},
layout: "centered"
},
layout: "centered"
};

export const decorators = [];
decorators: [],
tags: ["autodocs"]
} satisfies Preview;

0 comments on commit 1e8e6d5

Please sign in to comment.