Skip to content

Commit 9bc3676

Browse files
Merge pull request #3 from harshzalavadiya/to-storybook-6-
♻️ upgrade to storybook 6
2 parents 8dcd955 + 14e4028 commit 9bc3676

File tree

6 files changed

+4050
-3950
lines changed

6 files changed

+4050
-3950
lines changed

.storybook/main.js

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,9 @@
11
module.exports = {
2-
stories: ['../stories/**/*.stories.(ts|tsx)'],
3-
addons: ['@storybook/addon-actions', '@storybook/addon-links', '@storybook/addon-docs'],
4-
webpackFinal: async (config) => {
5-
config.module.rules.push({
6-
test: /\.(ts|tsx)$/,
7-
use: [
8-
{
9-
loader: require.resolve('ts-loader'),
10-
options: {
11-
transpileOnly: true,
12-
},
13-
},
14-
{
15-
loader: require.resolve('react-docgen-typescript-loader'),
16-
},
17-
],
18-
});
19-
20-
config.resolve.extensions.push('.ts', '.tsx');
21-
22-
return config;
23-
},
2+
stories: ["../stories/**/*.stories.@(ts|tsx)"],
3+
addons: [
4+
"@storybook/addon-essentials",
5+
"@storybook/addon-links",
6+
"@storybook/addon-knobs",
7+
"@storybook/addon-storysource",
8+
],
249
};

.storybook/preview-head.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<style>
2+
* {
3+
box-sizing: border-box;
4+
}
5+
6+
html,
7+
body,
8+
#root {
9+
height: 100%;
10+
font-family: sans-serif;
11+
padding: 0!important;
12+
margin: 0!important;
13+
}
14+
15+
.multi-select {
16+
max-width: 300px;
17+
}
18+
</style>

package.json

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-web-share",
33
"author": "Harsh Zalavadiya",
4-
"version": "1.0.7",
4+
"version": "1.0.8",
55
"license": "MIT",
66
"repository": "harshzalavadiya/react-web-share",
77
"module": "dist/react-web-share.esm.js",
@@ -25,25 +25,24 @@
2525
},
2626
"devDependencies": {
2727
"@ampproject/filesize": "^4.2.0",
28-
"@babel/core": "^7.9.6",
29-
"@storybook/addon-actions": "^5.3.19",
30-
"@storybook/addon-docs": "^5.3.19",
31-
"@storybook/addon-info": "^5.3.19",
32-
"@storybook/addon-links": "^5.3.19",
33-
"@storybook/addons": "^5.3.19",
34-
"@storybook/react": "^5.3.19",
35-
"@types/react": "^16.9.35",
28+
"@babel/core": "^7.11.6",
29+
"@storybook/addon-essentials": "^6.0.22",
30+
"@storybook/addon-knobs": "^6.0.22",
31+
"@storybook/addon-links": "^6.0.22",
32+
"@storybook/addon-storysource": "^6.0.22",
33+
"@storybook/addons": "^6.0.22",
34+
"@storybook/react": "^6.0.22",
35+
"@types/react": "^16.9.49",
3636
"@types/react-dom": "^16.9.8",
3737
"babel-loader": "^8.1.0",
38-
"husky": "^4.2.5",
38+
"husky": "^4.3.0",
3939
"react": "^16.13.1",
40-
"react-docgen-typescript-loader": "^3.7.2",
4140
"react-dom": "^16.13.1",
4241
"react-is": "^16.13.1",
43-
"ts-loader": "^7.0.5",
44-
"tsdx": "^0.13.2",
45-
"tslib": "^2.0.0",
46-
"typescript": "^3.9.3"
42+
"ts-loader": "^8.0.4",
43+
"tsdx": "^0.14.0",
44+
"tslib": "^2.0.1",
45+
"typescript": "^4.0.3"
4746
},
4847
"husky": {
4948
"hooks": {

src/components/icon/list.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const iconList: IconListType = {
1010
<path d="M23.998 12c0-6.628-5.372-12-11.999-12C5.372 0 0 5.372 0 12c0 5.988 4.388 10.952 10.124 11.852v-8.384H7.078v-3.469h3.046V9.356c0-3.008 1.792-4.669 4.532-4.669 1.313 0 2.686.234 2.686.234v2.953H15.83c-1.49 0-1.955.925-1.955 1.874V12h3.328l-.532 3.469h-2.796v8.384c5.736-.9 10.124-5.864 10.124-11.853z" />
1111
),
1212
color: "#0076FB",
13-
e: (l) => window.open(`https://www.facebook.com/sharer/sharer.php?u=${l}`),
13+
e: l => window.open(`https://www.facebook.com/sharer/sharer.php?u=${l}`),
1414
},
1515
twitter: {
1616
path: (
@@ -62,7 +62,7 @@ const iconList: IconListType = {
6262
<path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path>
6363
),
6464
color: "#718096",
65-
e: (l) => navigator.clipboard.writeText(l),
65+
e: l => navigator.clipboard.writeText(l),
6666
},
6767
};
6868

0 commit comments

Comments
 (0)