Skip to content

Commit 4b11a78

Browse files
committed
chore: add storybook
1 parent 295a995 commit 4b11a78

File tree

4 files changed

+7214
-233
lines changed

4 files changed

+7214
-233
lines changed

.storybook/main.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
"stories": [
3+
"../stories/**/*.stories.mdx",
4+
"../stories/**/*.stories.@(js|jsx|ts|tsx)"
5+
],
6+
"addons": [
7+
"@storybook/addon-links",
8+
"@storybook/addon-essentials"
9+
]
10+
}

.storybook/preview.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export const parameters = {
2+
actions: { argTypesRegex: "^on[A-Z].*" },
3+
controls: {
4+
matchers: {
5+
color: /(background|color)$/i,
6+
date: /Date$/,
7+
},
8+
},
9+
}

package.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,23 @@
1010
"webapp"
1111
],
1212
"scripts": {
13-
"lint": "lerna run lint --parallel --no-bail --stream"
13+
"lint": "lerna run lint --parallel --no-bail --stream",
14+
"storybook": "start-storybook -p 6006",
15+
"build-storybook": "build-storybook"
1416
},
1517
"devDependencies": {
18+
"@babel/core": "^7.16.0",
19+
"@storybook/addon-actions": "^6.3.12",
20+
"@storybook/addon-essentials": "^6.3.12",
21+
"@storybook/addon-links": "^6.3.12",
22+
"@storybook/react": "^6.3.12",
23+
"@types/react": "^17.0.34",
24+
"babel-loader": "^8.2.3",
25+
"eslint": "<8.0.0",
1626
"lerna": "4.0.0",
1727
"markdown-spellcheck": "1.3.1",
1828
"markdownlint-cli": "0.29.0",
19-
"typescript": "4.4.4",
20-
"@types/react": "^17.0.34",
21-
"eslint": "<8.0.0"
22-
}
29+
"typescript": "4.4.4"
30+
},
31+
"dependencies": {}
2332
}

0 commit comments

Comments
 (0)