Skip to content

Commit

Permalink
docs(storybook): added theme to storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
BayanBennett committed Sep 22, 2022
1 parent 6f945e5 commit f7e1f7d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .storybook/manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { addons } from "@storybook/addons";
import { theme } from "./theme";

addons.setConfig({
theme,
});
15 changes: 14 additions & 1 deletion .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import { theme } from "./theme";
import { Theme } from "../libs/Theme";

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
Expand All @@ -6,4 +9,14 @@ export const parameters = {
date: /Date$/,
},
},
}
layout: "centered",
docs: { theme },
};

export const decorators = [
(Story) => (
<Theme>
<Story />
</Theme>
),
];
9 changes: 9 additions & 0 deletions .storybook/theme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { create } from "@storybook/theming";

export const theme = create({
base: "dark",
brandTitle: "Coradion",
brandUrl: "https://coradion.com",
brandImage: "https://place-hold.it/350x150",
brandTarget: "_blank",
});

0 comments on commit f7e1f7d

Please sign in to comment.