Skip to content

Commit

Permalink
Merge pull request #3 from harshzalavadiya/to-storybook-6-
Browse files Browse the repository at this point in the history
♻️ upgrade to storybook 6
  • Loading branch information
harshzalavadiya authored Oct 1, 2020
2 parents 8dcd955 + 14e4028 commit 9bc3676
Show file tree
Hide file tree
Showing 6 changed files with 4,050 additions and 3,950 deletions.
29 changes: 7 additions & 22 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@
module.exports = {
stories: ['../stories/**/*.stories.(ts|tsx)'],
addons: ['@storybook/addon-actions', '@storybook/addon-links', '@storybook/addon-docs'],
webpackFinal: async (config) => {
config.module.rules.push({
test: /\.(ts|tsx)$/,
use: [
{
loader: require.resolve('ts-loader'),
options: {
transpileOnly: true,
},
},
{
loader: require.resolve('react-docgen-typescript-loader'),
},
],
});

config.resolve.extensions.push('.ts', '.tsx');

return config;
},
stories: ["../stories/**/*.stories.@(ts|tsx)"],
addons: [
"@storybook/addon-essentials",
"@storybook/addon-links",
"@storybook/addon-knobs",
"@storybook/addon-storysource",
],
};
18 changes: 18 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<style>
* {
box-sizing: border-box;
}

html,
body,
#root {
height: 100%;
font-family: sans-serif;
padding: 0!important;
margin: 0!important;
}

.multi-select {
max-width: 300px;
}
</style>
29 changes: 14 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-web-share",
"author": "Harsh Zalavadiya",
"version": "1.0.7",
"version": "1.0.8",
"license": "MIT",
"repository": "harshzalavadiya/react-web-share",
"module": "dist/react-web-share.esm.js",
Expand All @@ -25,25 +25,24 @@
},
"devDependencies": {
"@ampproject/filesize": "^4.2.0",
"@babel/core": "^7.9.6",
"@storybook/addon-actions": "^5.3.19",
"@storybook/addon-docs": "^5.3.19",
"@storybook/addon-info": "^5.3.19",
"@storybook/addon-links": "^5.3.19",
"@storybook/addons": "^5.3.19",
"@storybook/react": "^5.3.19",
"@types/react": "^16.9.35",
"@babel/core": "^7.11.6",
"@storybook/addon-essentials": "^6.0.22",
"@storybook/addon-knobs": "^6.0.22",
"@storybook/addon-links": "^6.0.22",
"@storybook/addon-storysource": "^6.0.22",
"@storybook/addons": "^6.0.22",
"@storybook/react": "^6.0.22",
"@types/react": "^16.9.49",
"@types/react-dom": "^16.9.8",
"babel-loader": "^8.1.0",
"husky": "^4.2.5",
"husky": "^4.3.0",
"react": "^16.13.1",
"react-docgen-typescript-loader": "^3.7.2",
"react-dom": "^16.13.1",
"react-is": "^16.13.1",
"ts-loader": "^7.0.5",
"tsdx": "^0.13.2",
"tslib": "^2.0.0",
"typescript": "^3.9.3"
"ts-loader": "^8.0.4",
"tsdx": "^0.14.0",
"tslib": "^2.0.1",
"typescript": "^4.0.3"
},
"husky": {
"hooks": {
Expand Down
4 changes: 2 additions & 2 deletions src/components/icon/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const iconList: IconListType = {
<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" />
),
color: "#0076FB",
e: (l) => window.open(`https://www.facebook.com/sharer/sharer.php?u=${l}`),
e: l => window.open(`https://www.facebook.com/sharer/sharer.php?u=${l}`),
},
twitter: {
path: (
Expand Down Expand Up @@ -62,7 +62,7 @@ const iconList: IconListType = {
<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>
),
color: "#718096",
e: (l) => navigator.clipboard.writeText(l),
e: l => navigator.clipboard.writeText(l),
},
};

Expand Down
File renamed without changes.
Loading

0 comments on commit 9bc3676

Please sign in to comment.