Skip to content

Commit

Permalink
Merge pull request #335 from jendowns/storybook-info-addon
Browse files Browse the repository at this point in the history
docs(storybook-react): add withInfo decorator to view source in storybook
  • Loading branch information
natashadecoste authored Sep 6, 2019
2 parents ca2b0ca + 1149bad commit a38543d
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 13 deletions.
7 changes: 6 additions & 1 deletion packages/react/.storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import { configure } from '@storybook/react';
import { addDecorator, configure } from '@storybook/react';
import { setOptions } from '@storybook/addon-options';
import { withInfo } from '@storybook/addon-info';

setOptions({
name: 'Carbon Charts - React Wrappers',
showDownPanel: false,
showAddonPanel: false
});

addDecorator(
withInfo()
);

// load global styles
require("!style-loader!css-loader!sass-loader!./previews.scss");
require("!style-loader!css-loader!@carbon/charts/dist/style.css");
Expand Down
1 change: 1 addition & 0 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"react-dom": "^16.6.3"
},
"devDependencies": {
"@storybook/addon-info": "5.0.11",
"@storybook/addon-options": "5.0.11",
"@storybook/react": "5.0.11",
"@storybook/storybook-deployer": "2.8.1",
Expand Down
Binary file not shown.
Binary file not shown.
Binary file added yarn-offline-mirror-cache/marksy-6.1.0.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
81 changes: 69 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1967,6 +1967,27 @@
error-stack-parser "^2.0.0"
string-width "^2.0.0"

"@storybook/[email protected]":
version "5.0.11"
resolved "https://registry.yarnpkg.com/@storybook/addon-info/-/addon-info-5.0.11.tgz#d051fdf2b9e6c15b0bc4ef2a23200f35f1e1397d"
integrity sha512-lAz0zranutGXtoBbKLIGA4nOlb9YfSDu24A3uR6Q743LTo/SWUiZW14E+JkBkNI/oReev8DyvMSL26t8Z9RlfA==
dependencies:
"@storybook/addons" "5.0.11"
"@storybook/client-logger" "5.0.11"
"@storybook/components" "5.0.11"
"@storybook/theming" "5.0.11"
core-js "^2.6.5"
global "^4.3.2"
marksy "^6.1.0"
nested-object-assign "^1.0.1"
prop-types "^15.6.2"
react "^16.8.1"
react-addons-create-fragment "^15.5.3"
react-element-to-jsx-string "^14.0.2"
react-is "^16.8.1"
react-lifecycles-compat "^3.0.4"
util-deprecate "^1.0.2"

"@storybook/[email protected]":
version "5.0.11"
resolved "https://registry.yarnpkg.com/@storybook/addon-links/-/addon-links-5.0.11.tgz#59a9ce8acc8d5dd7e5622ff875cafc8fe4d6e865"
Expand Down Expand Up @@ -4918,6 +4939,11 @@ babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0:
core-js "^2.4.0"
regenerator-runtime "^0.11.0"

babel-standalone@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-standalone/-/babel-standalone-6.26.0.tgz#15fb3d35f2c456695815ebf1ed96fe7f015b6886"
integrity sha1-Ffs9NfLEVmlYFevx7Zb+fwFbaIY=

babel-template@^6.24.1, babel-template@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02"
Expand Down Expand Up @@ -9123,7 +9149,7 @@ faye-websocket@~0.11.1:
dependencies:
websocket-driver ">=0.5.1"

fbjs@^0.8.0, fbjs@^0.8.1:
fbjs@^0.8.0, fbjs@^0.8.1, fbjs@^0.8.4:
version "0.8.17"
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd"
integrity sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90=
Expand Down Expand Up @@ -10491,7 +10517,7 @@ hastscript@^5.0.0:
property-information "^5.0.1"
space-separated-tokens "^1.0.0"

[email protected], [email protected], he@^1.1.0:
[email protected], [email protected], he@^1.1.0, he@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
Expand Down Expand Up @@ -11561,20 +11587,20 @@ is-plain-obj@^1.0.0, is-plain-obj@^1.1.0:
resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4=

[email protected], is-plain-object@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-3.0.0.tgz#47bfc5da1b5d50d64110806c199359482e75a928"
integrity sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==
dependencies:
isobject "^4.0.0"

is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==
dependencies:
isobject "^3.0.1"

is-plain-object@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-3.0.0.tgz#47bfc5da1b5d50d64110806c199359482e75a928"
integrity sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==
dependencies:
isobject "^4.0.0"

is-png@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-png/-/is-png-1.1.0.tgz#d574b12bf275c0350455570b0e5b57ab062077ce"
Expand Down Expand Up @@ -12685,7 +12711,7 @@ longest@^1.0.0, longest@^1.0.1:
resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
integrity sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=

loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.4.0:
loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1, loose-envify@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
Expand Down Expand Up @@ -12839,11 +12865,20 @@ markdown-to-jsx@^6.9.1:
prop-types "^15.6.2"
unquote "^1.1.0"

marked@^0.3.17:
marked@^0.3.12, marked@^0.3.17:
version "0.3.19"
resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.19.tgz#5d47f709c4c9fc3c216b6d46127280f40b39d790"
integrity sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==

marksy@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/marksy/-/marksy-6.1.0.tgz#36482148a1115cc78570855f7ebd744bb453d5cc"
integrity sha512-xVAuJQxwdAljvFVqlY7CIRewn5YHGvCqeJkY1bbcTBfZV4dNDSZpHWTREb1MNu/oXYzKgg5pmTfE1DIW6M1zrA==
dependencies:
babel-standalone "^6.26.0"
he "^1.1.1"
marked "^0.3.12"

matcher@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/matcher/-/matcher-1.1.1.tgz#51d8301e138f840982b338b116bb0c09af62c1c2"
Expand Down Expand Up @@ -13379,6 +13414,11 @@ neo-async@^2.5.0, neo-async@^2.6.0:
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c"
integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==

nested-object-assign@^1.0.1:
version "1.0.3"
resolved "https://registry.yarnpkg.com/nested-object-assign/-/nested-object-assign-1.0.3.tgz#5aca69390d9affe5a612152b5f0843ae399ac597"
integrity sha512-kgq1CuvLyUcbcIuTiCA93cQ2IJFSlRwXcN+hLcb2qLJwC2qrePHGZZa7IipyWqaWF6tQjdax2pQnVxdq19Zzwg==

[email protected]:
version "4.7.1"
resolved "https://registry.yarnpkg.com/ng-packagr/-/ng-packagr-4.7.1.tgz#a3e8fd2a7b70573a3a7759c4c57408a3b0e8ce11"
Expand Down Expand Up @@ -15783,6 +15823,15 @@ rc@^1.0.1, rc@^1.1.2, rc@^1.1.6, rc@^1.2.7:
minimist "^1.2.0"
strip-json-comments "~2.0.1"

react-addons-create-fragment@^15.5.3:
version "15.6.2"
resolved "https://registry.yarnpkg.com/react-addons-create-fragment/-/react-addons-create-fragment-15.6.2.tgz#a394de7c2c7becd6b5475ba1b97ac472ce7c74f8"
integrity sha1-o5TefCx77Na1R1uhuXrEcs58dPg=
dependencies:
fbjs "^0.8.4"
loose-envify "^1.3.1"
object-assign "^4.1.0"

react-clientside-effect@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/react-clientside-effect/-/react-clientside-effect-1.2.0.tgz#db823695f75e9616a5e4dd6d908e5ea627fb2516"
Expand Down Expand Up @@ -15862,6 +15911,14 @@ react-draggable@^3.1.1:
classnames "^2.2.5"
prop-types "^15.6.0"

react-element-to-jsx-string@^14.0.2:
version "14.0.3"
resolved "https://registry.yarnpkg.com/react-element-to-jsx-string/-/react-element-to-jsx-string-14.0.3.tgz#64f50fdbf6ba154d6439da3d7307f79069b94d58"
integrity sha512-ziZAm7OwEfFtyhCmQiFNI87KFu+G9EP8qVW4XtDHdKNqqprYifLzqXkzHqC1vnVsPhyp2znoPm0bJHAf1mUBZA==
dependencies:
is-plain-object "3.0.0"
stringify-object "3.3.0"

react-error-overlay@^5.1.4:
version "5.1.6"
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-5.1.6.tgz#0cd73407c5d141f9638ae1e0c63e7b2bf7e9929d"
Expand Down Expand Up @@ -17767,7 +17824,7 @@ string_decoder@~1.1.1:
dependencies:
safe-buffer "~5.1.0"

stringify-object@^3.2.2:
stringify-object@3.3.0, stringify-object@^3.2.2:
version "3.3.0"
resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.3.0.tgz#703065aefca19300d3ce88af4f5b3956d7556629"
integrity sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==
Expand Down

0 comments on commit a38543d

Please sign in to comment.