Skip to content

Commit 3533449

Browse files
committed
setup storybook and stories for some buttons
1 parent 34fe0c6 commit 3533449

5 files changed

Lines changed: 13061 additions & 6647 deletions

File tree

.storybook/main.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
module.exports = {
2+
stories: [
3+
"../src/**/*.stories.mdx",
4+
"../src/**/*.stories.@(js|jsx|ts|tsx)"
5+
],
6+
addons: [
7+
"@storybook/addon-links",
8+
"@storybook/addon-essentials"
9+
],
10+
webpackFinal: async (config) => {
11+
config.externals = {
12+
'fs': 'null',
13+
'node-uuid': 'null',
14+
'node-fetch': 'fetch',
15+
'isomorphic-fetch': 'fetch',
16+
'xmldom': 'window',
17+
'text-encoding': 'TextEncoder',
18+
'whatwg-url': 'window',
19+
'@trust/webcrypto': 'crypto'
20+
}
21+
// Return the altered config
22+
return config;
23+
},
24+
};

.storybook/preview.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
export const parameters = {
3+
actions: { argTypesRegex: "^on[A-Z].*" },
4+
}
5+
6+
export const decorators = [(Story) => (
7+
Story().outerHTML
8+
)]

0 commit comments

Comments
 (0)