Skip to content

Commit

Permalink
Set up autodocs and dark mode toggler.
Browse files Browse the repository at this point in the history
  • Loading branch information
Carifio24 committed May 29, 2024
1 parent 3b2b0a3 commit 439ad63
Show file tree
Hide file tree
Showing 6 changed files with 530 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const config: StorybookConfig = {
"@storybook/addon-essentials",
"@chromatic-com/storybook",
"@storybook/addon-interactions",
"@storybook/addon-docs",
"storybook-dark-mode",
],
framework: {
name: "@storybook/vue3-webpack5",
Expand Down
6 changes: 6 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ setup((app) => {
});

const preview: Preview = {
// TODO: This is what storybook tells us to do:
// https://storybook.js.org/docs/writing-docs/autodocs
// but doesn't seem to work. Why not?
// For now, we can work around this by marking each story
// with this tag
// tags: ["autodocs"],
parameters: {
controls: {
matchers: {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"react": "^18.3.1",
"storybook": "^8.0.9",
"storybook-css-modules-preset": "^1.1.1",
"storybook-dark-mode": "^4.0.1",
"style-loader": "^4.0.0",
"typedoc": "^0.25.13",
"typedoc-plugin-markdown": "^3.17.1",
Expand Down
1 change: 1 addition & 0 deletions src/stories/CreditLogos.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import CreditLogos from "../components/CreditLogos.vue";

const meta: Meta<typeof CreditLogos> = {
component: CreditLogos,
tags: ["autodocs"],
};

export default meta;
Expand Down
1 change: 1 addition & 0 deletions src/stories/IconButton.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ library.add(faBookOpen);

const meta: Meta<typeof IconButton> = {
component: IconButton,
tags: ["autodocs"],
};

export default meta;
Expand Down
Loading

0 comments on commit 439ad63

Please sign in to comment.