diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b8e82ddb90c3..d52575a10d07 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,16 +33,16 @@ To test your project against the current latest version of storybook, you can cl ``` cd packages/react-storybook npm link - + cd npm link @kadira/storybook - + # repeat with whichever other parts of the monorepo you are using. ``` ### Reproductions -The best way to help figure out an issue you are having is to produce a minimal reproduction against the `master` branch. +The best way to help figure out an issue you are having is to produce a minimal reproduction against the `master` branch. A good way to do that is using the example `test-cra` app embedded in this repository: @@ -155,7 +155,7 @@ getstorybook Then link storybook inside the sample project with: ```sh -npm link @storybook/storybook +npm link @storybook/react ``` ### Getting Changes diff --git a/addons/actions/.storybook/addons.js b/addons/actions/.storybook/addons.js new file mode 100644 index 000000000000..e4f70f25bfa3 --- /dev/null +++ b/addons/actions/.storybook/addons.js @@ -0,0 +1 @@ +import '../register'; diff --git a/packages/addon-links/.storybook/config.js b/addons/actions/.storybook/config.js similarity index 52% rename from packages/addon-links/.storybook/config.js rename to addons/actions/.storybook/config.js index c834bb2d0888..29599c59b5d2 100644 --- a/packages/addon-links/.storybook/config.js +++ b/addons/actions/.storybook/config.js @@ -1,2 +1,2 @@ -import * as storybook from '@storybook/storybook'; +import * as storybook from '@storybook/react'; storybook.configure(() => require('./stories'), module); diff --git a/packages/addon-actions/.storybook/stories.js b/addons/actions/.storybook/stories.js similarity index 93% rename from packages/addon-actions/.storybook/stories.js rename to addons/actions/.storybook/stories.js index f2282c60bbb5..05620ab77b5c 100644 --- a/packages/addon-actions/.storybook/stories.js +++ b/addons/actions/.storybook/stories.js @@ -1,5 +1,5 @@ import React from 'react'; -import { storiesOf } from '@storybook/storybook'; +import { storiesOf } from '@storybook/react'; import { action, decorateAction } from '../src'; const pickFirst = decorateAction([ diff --git a/packages/addon-actions/CHANGELOG.md b/addons/actions/CHANGELOG.md similarity index 100% rename from packages/addon-actions/CHANGELOG.md rename to addons/actions/CHANGELOG.md diff --git a/packages/addon-actions/README.md b/addons/actions/README.md similarity index 93% rename from packages/addon-actions/README.md rename to addons/actions/README.md index cc245f726130..6585047a4ad2 100644 --- a/packages/addon-actions/README.md +++ b/addons/actions/README.md @@ -13,8 +13,8 @@ Import the `action` function and use it to create actions handlers. When creatin > *Note: Make sure NOT to use reserved words as function names. [issues#29](https://github.com/storybooks/storybook-addon-actions/issues/29#issuecomment-288274794)* ```js -import { storiesOf, action } from '@storybook/storybook' -// or import { action } from '@storybook/addon-actions' +import { storiesOf } from '@storybook/react' +import { action } from '@storybook/addon-actions' storiesOf('Button', module) .add('default view', () => ( diff --git a/packages/addon-actions/docs/screenshot.png b/addons/actions/docs/screenshot.png similarity index 100% rename from packages/addon-actions/docs/screenshot.png rename to addons/actions/docs/screenshot.png diff --git a/packages/addon-actions/package.json b/addons/actions/package.json similarity index 90% rename from packages/addon-actions/package.json rename to addons/actions/package.json index 4d3026f0ef6a..8b6e066d0aa7 100644 --- a/packages/addon-actions/package.json +++ b/addons/actions/package.json @@ -21,9 +21,9 @@ }, "homepage": "https://github.com/storybooks/storybook/tree/master/packages/addon-actions", "devDependencies": { - "@storybook/storybook": "*", + "@storybook/react": "*", "@storybook/addons": "*", - "@storybook/storybook-ui": "*", + "@storybook/ui": "*", "react": "^15.5.4", "react-dom": "^15.5.4", "react-test-renderer": "^15.5.4", diff --git a/packages/addon-actions/register.js b/addons/actions/register.js similarity index 100% rename from packages/addon-actions/register.js rename to addons/actions/register.js diff --git a/packages/addon-actions/src/components/ActionLogger/index.js b/addons/actions/src/components/ActionLogger/index.js similarity index 100% rename from packages/addon-actions/src/components/ActionLogger/index.js rename to addons/actions/src/components/ActionLogger/index.js diff --git a/packages/addon-actions/src/components/ActionLogger/style.js b/addons/actions/src/components/ActionLogger/style.js similarity index 100% rename from packages/addon-actions/src/components/ActionLogger/style.js rename to addons/actions/src/components/ActionLogger/style.js diff --git a/packages/addon-actions/src/containers/ActionLogger/index.js b/addons/actions/src/containers/ActionLogger/index.js similarity index 100% rename from packages/addon-actions/src/containers/ActionLogger/index.js rename to addons/actions/src/containers/ActionLogger/index.js diff --git a/packages/addon-actions/src/index.js b/addons/actions/src/index.js similarity index 100% rename from packages/addon-actions/src/index.js rename to addons/actions/src/index.js diff --git a/packages/addon-actions/src/manager.js b/addons/actions/src/manager.js similarity index 100% rename from packages/addon-actions/src/manager.js rename to addons/actions/src/manager.js diff --git a/packages/addon-actions/src/preview.js b/addons/actions/src/preview.js similarity index 100% rename from packages/addon-actions/src/preview.js rename to addons/actions/src/preview.js diff --git a/packages/decorator-centered/CHANGELOG.md b/addons/centered/CHANGELOG.md similarity index 100% rename from packages/decorator-centered/CHANGELOG.md rename to addons/centered/CHANGELOG.md diff --git a/packages/decorator-centered/LICENSE b/addons/centered/LICENSE similarity index 100% rename from packages/decorator-centered/LICENSE rename to addons/centered/LICENSE diff --git a/packages/decorator-centered/README.md b/addons/centered/README.md similarity index 85% rename from packages/decorator-centered/README.md rename to addons/centered/README.md index 9937429ad3c3..98283ca14bbf 100644 --- a/packages/decorator-centered/README.md +++ b/addons/centered/README.md @@ -13,7 +13,7 @@ You can set the decorator locally: ```js import React from 'react'; -import { storiesOf } from '@storybook/storybook'; +import { storiesOf } from '@storybook/react'; import MyComponent from '../my_component'; import centered from '@storybook/react-storybook-decorator-centered'; @@ -26,7 +26,7 @@ storiesOf('MyComponent', module) Or you can also add this decorator globally: ```js -import { configure, addDecorator } from '@storybook/storybook'; +import { configure, addDecorator } from '@storybook/react'; import centered from '@storybook/react-storybook-decorator-centered'; addDecorator(centered); @@ -41,7 +41,7 @@ configure(function () { ```js import React from 'react'; -import { configure, setAddon } from '@storybook/storybook'; +import { configure, setAddon } from '@storybook/react'; import centered from '@storybook/react-storybook-decorator-centered'; setAddon({ @@ -61,7 +61,7 @@ configure(function () { ```js import React from 'react'; -import { storiesOf } from '@storybook/storybook'; +import { storiesOf } from '@storybook/react'; import MyComponent from '../my_component'; storiesOf('MyComponent', module) diff --git a/packages/decorator-centered/example/index.html b/addons/centered/example/index.html similarity index 100% rename from packages/decorator-centered/example/index.html rename to addons/centered/example/index.html diff --git a/packages/decorator-centered/example/index.js b/addons/centered/example/index.js similarity index 100% rename from packages/decorator-centered/example/index.js rename to addons/centered/example/index.js diff --git a/packages/decorator-centered/example/style.css b/addons/centered/example/style.css similarity index 100% rename from packages/decorator-centered/example/style.css rename to addons/centered/example/style.css diff --git a/packages/decorator-centered/package.json b/addons/centered/package.json similarity index 85% rename from packages/decorator-centered/package.json rename to addons/centered/package.json index a38820eedbbc..c714ff17de59 100644 --- a/packages/decorator-centered/package.json +++ b/addons/centered/package.json @@ -1,5 +1,5 @@ { - "name": "@storybook/react-storybook-decorator-centered", + "name": "@storybook/addon-centered", "version": "1.1.2", "description": "React Storybook decorator to center components", "main": "build/index.js", diff --git a/packages/decorator-centered/src/index.js b/addons/centered/src/index.js similarity index 100% rename from packages/decorator-centered/src/index.js rename to addons/centered/src/index.js diff --git a/packages/addon-comments/.scripts/get_gh_pages_url.js b/addons/comments/.scripts/get_gh_pages_url.js similarity index 100% rename from packages/addon-comments/.scripts/get_gh_pages_url.js rename to addons/comments/.scripts/get_gh_pages_url.js diff --git a/packages/addon-comments/.scripts/mocha_runner.js b/addons/comments/.scripts/mocha_runner.js similarity index 100% rename from packages/addon-comments/.scripts/mocha_runner.js rename to addons/comments/.scripts/mocha_runner.js diff --git a/packages/addon-comments/.scripts/publish_storybook.sh b/addons/comments/.scripts/publish_storybook.sh similarity index 100% rename from packages/addon-comments/.scripts/publish_storybook.sh rename to addons/comments/.scripts/publish_storybook.sh diff --git a/packages/addon-comments/.scripts/user/prepublish.sh b/addons/comments/.scripts/user/prepublish.sh similarity index 100% rename from packages/addon-comments/.scripts/user/prepublish.sh rename to addons/comments/.scripts/user/prepublish.sh diff --git a/packages/addon-comments/.scripts/user/pretest.js b/addons/comments/.scripts/user/pretest.js similarity index 100% rename from packages/addon-comments/.scripts/user/pretest.js rename to addons/comments/.scripts/user/pretest.js diff --git a/packages/addon-comments/.storybook/addons.js b/addons/comments/.storybook/addons.js similarity index 76% rename from packages/addon-comments/.storybook/addons.js rename to addons/comments/.storybook/addons.js index 335de242c30c..3412984b2975 100644 --- a/packages/addon-comments/.storybook/addons.js +++ b/addons/comments/.storybook/addons.js @@ -1,6 +1,7 @@ // Use the line below to register this addon -// import '@storybook/storybook-addon-comments/register'; +// import '@storybook/addon-comments/register'; import '@storybook/addon-actions/register'; import '@kadira/storybook-database-cloud/register'; + import { init } from '../src/manager'; init(); diff --git a/packages/addon-comments/.storybook/config.js b/addons/comments/.storybook/config.js similarity index 79% rename from packages/addon-comments/.storybook/config.js rename to addons/comments/.storybook/config.js index 87534ebafadb..a35b2531aa1a 100644 --- a/packages/addon-comments/.storybook/config.js +++ b/addons/comments/.storybook/config.js @@ -3,7 +3,7 @@ // This is an auto generated file with React CDK. // Do not modify this file. -import { configure } from '@storybook/storybook'; +import { configure } from '@storybook/react'; function loadStories() { require('../src/stories'); diff --git a/packages/addon-comments/CHANGELOG.md b/addons/comments/CHANGELOG.md similarity index 100% rename from packages/addon-comments/CHANGELOG.md rename to addons/comments/CHANGELOG.md diff --git a/packages/addon-comments/LICENSE b/addons/comments/LICENSE similarity index 100% rename from packages/addon-comments/LICENSE rename to addons/comments/LICENSE diff --git a/packages/addon-comments/README.md b/addons/comments/README.md similarity index 77% rename from packages/addon-comments/README.md rename to addons/comments/README.md index 4a2f58747af7..49fb9aab2ac0 100644 --- a/packages/addon-comments/README.md +++ b/addons/comments/README.md @@ -9,11 +9,11 @@ This Storybook addon allows you to add comments for your stories. This addon wor First, install the addon ```shell -npm install -D @storybook/storybook-addon-comments +npm install -D @storybook/addon-comments ``` Add this line to your `addons.js` file (create this file inside your storybook config directory if needed). ```js -import '@storybook/storybook-addon-comments/register'; +import '@storybook/addon-comments/register'; ``` diff --git a/packages/addon-comments/docs/screenshot.png b/addons/comments/docs/screenshot.png similarity index 100% rename from packages/addon-comments/docs/screenshot.png rename to addons/comments/docs/screenshot.png diff --git a/packages/addon-comments/manager.js b/addons/comments/manager.js similarity index 100% rename from packages/addon-comments/manager.js rename to addons/comments/manager.js diff --git a/packages/addon-comments/package.json b/addons/comments/package.json similarity index 95% rename from packages/addon-comments/package.json rename to addons/comments/package.json index 178a4945cb43..3b25d08bec1a 100644 --- a/packages/addon-comments/package.json +++ b/addons/comments/package.json @@ -34,11 +34,11 @@ "react-textarea-autosize": "^4.3.0" }, "devDependencies": { - "@storybook/storybook": "*", + "@storybook/react": "*", "@storybook/addons": "*", "@kadira/storybook-database-cloud": "*", "@kadira/storybook-deployer": "*", - "@storybook/storybook-ui": "*", + "@storybook/ui": "*", "git-url-parse": "^6.2.2", "react": "^15.5.4", "react-dom": "^15.5.4", diff --git a/packages/addon-comments/preview.js b/addons/comments/preview.js similarity index 100% rename from packages/addon-comments/preview.js rename to addons/comments/preview.js diff --git a/packages/addon-comments/register.js b/addons/comments/register.js similarity index 100% rename from packages/addon-comments/register.js rename to addons/comments/register.js diff --git a/packages/addon-comments/src/index.js b/addons/comments/src/index.js similarity index 100% rename from packages/addon-comments/src/index.js rename to addons/comments/src/index.js diff --git a/packages/addon-comments/src/manager/components/CommentForm/index.js b/addons/comments/src/manager/components/CommentForm/index.js similarity index 100% rename from packages/addon-comments/src/manager/components/CommentForm/index.js rename to addons/comments/src/manager/components/CommentForm/index.js diff --git a/packages/addon-comments/src/manager/components/CommentForm/style.js b/addons/comments/src/manager/components/CommentForm/style.js similarity index 100% rename from packages/addon-comments/src/manager/components/CommentForm/style.js rename to addons/comments/src/manager/components/CommentForm/style.js diff --git a/packages/addon-comments/src/manager/components/CommentItem/index.js b/addons/comments/src/manager/components/CommentItem/index.js similarity index 100% rename from packages/addon-comments/src/manager/components/CommentItem/index.js rename to addons/comments/src/manager/components/CommentItem/index.js diff --git a/packages/addon-comments/src/manager/components/CommentItem/style.css.js b/addons/comments/src/manager/components/CommentItem/style.css.js similarity index 100% rename from packages/addon-comments/src/manager/components/CommentItem/style.css.js rename to addons/comments/src/manager/components/CommentItem/style.css.js diff --git a/packages/addon-comments/src/manager/components/CommentItem/style.js b/addons/comments/src/manager/components/CommentItem/style.js similarity index 100% rename from packages/addon-comments/src/manager/components/CommentItem/style.js rename to addons/comments/src/manager/components/CommentItem/style.js diff --git a/packages/addon-comments/src/manager/components/CommentList/index.js b/addons/comments/src/manager/components/CommentList/index.js similarity index 100% rename from packages/addon-comments/src/manager/components/CommentList/index.js rename to addons/comments/src/manager/components/CommentList/index.js diff --git a/packages/addon-comments/src/manager/components/CommentList/style.js b/addons/comments/src/manager/components/CommentList/style.js similarity index 100% rename from packages/addon-comments/src/manager/components/CommentList/style.js rename to addons/comments/src/manager/components/CommentList/style.js diff --git a/packages/addon-comments/src/manager/components/CommentsPanel/index.js b/addons/comments/src/manager/components/CommentsPanel/index.js similarity index 100% rename from packages/addon-comments/src/manager/components/CommentsPanel/index.js rename to addons/comments/src/manager/components/CommentsPanel/index.js diff --git a/packages/addon-comments/src/manager/components/CommentsPanel/style.js b/addons/comments/src/manager/components/CommentsPanel/style.js similarity index 100% rename from packages/addon-comments/src/manager/components/CommentsPanel/style.js rename to addons/comments/src/manager/components/CommentsPanel/style.js diff --git a/packages/addon-comments/src/manager/containers/CommentsPanel/dataStore.js b/addons/comments/src/manager/containers/CommentsPanel/dataStore.js similarity index 100% rename from packages/addon-comments/src/manager/containers/CommentsPanel/dataStore.js rename to addons/comments/src/manager/containers/CommentsPanel/dataStore.js diff --git a/packages/addon-comments/src/manager/containers/CommentsPanel/dataStore.test.js b/addons/comments/src/manager/containers/CommentsPanel/dataStore.test.js similarity index 100% rename from packages/addon-comments/src/manager/containers/CommentsPanel/dataStore.test.js rename to addons/comments/src/manager/containers/CommentsPanel/dataStore.test.js diff --git a/packages/addon-comments/src/manager/containers/CommentsPanel/index.js b/addons/comments/src/manager/containers/CommentsPanel/index.js similarity index 100% rename from packages/addon-comments/src/manager/containers/CommentsPanel/index.js rename to addons/comments/src/manager/containers/CommentsPanel/index.js diff --git a/packages/addon-comments/src/manager/index.js b/addons/comments/src/manager/index.js similarity index 100% rename from packages/addon-comments/src/manager/index.js rename to addons/comments/src/manager/index.js diff --git a/packages/addon-comments/src/preview/index.js b/addons/comments/src/preview/index.js similarity index 100% rename from packages/addon-comments/src/preview/index.js rename to addons/comments/src/preview/index.js diff --git a/packages/addon-comments/src/shared/index.js b/addons/comments/src/shared/index.js similarity index 100% rename from packages/addon-comments/src/shared/index.js rename to addons/comments/src/shared/index.js diff --git a/packages/addon-comments/src/stories/index.js b/addons/comments/src/stories/index.js similarity index 97% rename from packages/addon-comments/src/stories/index.js rename to addons/comments/src/stories/index.js index e7351161b41a..9ce72cb3ace9 100644 --- a/packages/addon-comments/src/stories/index.js +++ b/addons/comments/src/stories/index.js @@ -1,5 +1,5 @@ import React from 'react'; -import { storiesOf, action } from '@storybook/storybook'; +import { storiesOf, action } from '@storybook/react'; import Button from '../index'; import CommentForm from '../manager/components/CommentForm'; import CommentList from '../manager/components/CommentList'; diff --git a/packages/addon-actions/.storybook/config.js b/addons/graphql/.storybook/config.js similarity index 52% rename from packages/addon-actions/.storybook/config.js rename to addons/graphql/.storybook/config.js index c834bb2d0888..29599c59b5d2 100644 --- a/packages/addon-actions/.storybook/config.js +++ b/addons/graphql/.storybook/config.js @@ -1,2 +1,2 @@ -import * as storybook from '@storybook/storybook'; +import * as storybook from '@storybook/react'; storybook.configure(() => require('./stories'), module); diff --git a/packages/addon-graphql/.storybook/stories.js b/addons/graphql/.storybook/stories.js similarity index 87% rename from packages/addon-graphql/.storybook/stories.js rename to addons/graphql/.storybook/stories.js index fc3c7f212c10..e92ed79d4b19 100644 --- a/packages/addon-graphql/.storybook/stories.js +++ b/addons/graphql/.storybook/stories.js @@ -1,5 +1,5 @@ import React from 'react'; -import { storiesOf } from '@storybook/storybook' +import { storiesOf } from '@storybook/react' import { setupGraphiQL } from '../src' // setup the graphiql helper which can be used with the add method later diff --git a/packages/addon-graphql/CHANGELOG.md b/addons/graphql/CHANGELOG.md similarity index 100% rename from packages/addon-graphql/CHANGELOG.md rename to addons/graphql/CHANGELOG.md diff --git a/packages/addon-graphql/README.md b/addons/graphql/README.md similarity index 83% rename from packages/addon-graphql/README.md rename to addons/graphql/README.md index bbd44ac609ec..f5bbbef3da94 100644 --- a/packages/addon-graphql/README.md +++ b/addons/graphql/README.md @@ -9,14 +9,14 @@ The GraphiQL addon can be used to display the GraphiQL IDE with example queries. First, install the addon ```shell -npm install -D @storybook/storybook-addon-graphql +npm install -D @storybook/addon-graphql ``` Import the `setupGraphiQL` function and use it to create the graphiql helper with a base url. ```js -import { storiesOf } from '@storybook/storybook' -import { setupGraphiQL } from '@storybook/storybook-addon-graphql' +import { storiesOf } from '@storybook/react' +import { setupGraphiQL } from '@storybook/addon-graphql' // setup the graphiql helper which can be used with the add method later const graphiql = setupGraphiQL({ url: 'http://localhost:3000/graphql' }); @@ -36,8 +36,8 @@ storiesOf('GraphQL Demo', module) The `setupGraphiQL` function also accepts a fetcher parameter which can be used to change how graphiql gets data. If the fetcher parameter is not given, it'll create a fetcher which uses the `fetch` api to make requests. The above example can also be written using a custom fetcher. ```js -import { storiesOf } from '@storybook/storybook' -import { setupGraphiQL } from '@storybook/storybook-addon-graphql' +import { storiesOf } from '@storybook/react' +import { setupGraphiQL } from '@storybook/addon-graphql' const fetcher = function (params) { const options = { diff --git a/packages/addon-graphql/demo/data.json b/addons/graphql/demo/data.json similarity index 100% rename from packages/addon-graphql/demo/data.json rename to addons/graphql/demo/data.json diff --git a/packages/addon-graphql/demo/index.js b/addons/graphql/demo/index.js similarity index 100% rename from packages/addon-graphql/demo/index.js rename to addons/graphql/demo/index.js diff --git a/packages/addon-graphql/demo/package.json b/addons/graphql/demo/package.json similarity index 100% rename from packages/addon-graphql/demo/package.json rename to addons/graphql/demo/package.json diff --git a/packages/addon-graphql/docs/screenshot.png b/addons/graphql/docs/screenshot.png similarity index 100% rename from packages/addon-graphql/docs/screenshot.png rename to addons/graphql/docs/screenshot.png diff --git a/packages/addon-graphql/package.json b/addons/graphql/package.json similarity index 92% rename from packages/addon-graphql/package.json rename to addons/graphql/package.json index 58def2c509cf..7b95fd4be34d 100644 --- a/packages/addon-graphql/package.json +++ b/addons/graphql/package.json @@ -21,7 +21,7 @@ }, "homepage": "https://github.com/storybooks/storybook/tree/master/packages/addon-graphql", "devDependencies": { - "@storybook/storybook": "*", + "@storybook/react": "*", "react": "^15.5.4", "react-dom": "^15.5.4", "shelljs": "^0.7.7" diff --git a/packages/addon-graphql/src/components/FullScreen/index.js b/addons/graphql/src/components/FullScreen/index.js similarity index 100% rename from packages/addon-graphql/src/components/FullScreen/index.js rename to addons/graphql/src/components/FullScreen/index.js diff --git a/packages/addon-graphql/src/components/FullScreen/style.js b/addons/graphql/src/components/FullScreen/style.js similarity index 100% rename from packages/addon-graphql/src/components/FullScreen/style.js rename to addons/graphql/src/components/FullScreen/style.js diff --git a/packages/addon-graphql/src/index.js b/addons/graphql/src/index.js similarity index 100% rename from packages/addon-graphql/src/index.js rename to addons/graphql/src/index.js diff --git a/packages/addon-graphql/src/preview.js b/addons/graphql/src/preview.js similarity index 100% rename from packages/addon-graphql/src/preview.js rename to addons/graphql/src/preview.js diff --git a/packages/addon-info/.scripts/get_gh_pages_url.js b/addons/info/.scripts/get_gh_pages_url.js similarity index 100% rename from packages/addon-info/.scripts/get_gh_pages_url.js rename to addons/info/.scripts/get_gh_pages_url.js diff --git a/packages/addon-info/.scripts/mocha_runner.js b/addons/info/.scripts/mocha_runner.js similarity index 100% rename from packages/addon-info/.scripts/mocha_runner.js rename to addons/info/.scripts/mocha_runner.js diff --git a/packages/addon-info/.scripts/publish_storybook.sh b/addons/info/.scripts/publish_storybook.sh similarity index 100% rename from packages/addon-info/.scripts/publish_storybook.sh rename to addons/info/.scripts/publish_storybook.sh diff --git a/packages/addon-info/.scripts/user/prepublish.sh b/addons/info/.scripts/user/prepublish.sh similarity index 100% rename from packages/addon-info/.scripts/user/prepublish.sh rename to addons/info/.scripts/user/prepublish.sh diff --git a/packages/addon-info/.scripts/user/pretest.js b/addons/info/.scripts/user/pretest.js similarity index 100% rename from packages/addon-info/.scripts/user/pretest.js rename to addons/info/.scripts/user/pretest.js diff --git a/packages/addon-info/.storybook/addons.js b/addons/info/.storybook/addons.js similarity index 100% rename from packages/addon-info/.storybook/addons.js rename to addons/info/.storybook/addons.js diff --git a/packages/addon-info/.storybook/config.js b/addons/info/.storybook/config.js similarity index 75% rename from packages/addon-info/.storybook/config.js rename to addons/info/.storybook/config.js index 9a23131069d7..85ac9515b63c 100644 --- a/packages/addon-info/.storybook/config.js +++ b/addons/info/.storybook/config.js @@ -1,5 +1,5 @@ import React from 'react'; -import { configure, setAddon, addDecorator } from '@storybook/storybook'; +import { configure, setAddon, addDecorator } from '@storybook/react'; import InfoAddon from '../src/'; addDecorator((story) => ( diff --git a/packages/addon-info/.storybook/user/modify_webpack_config.js b/addons/info/.storybook/user/modify_webpack_config.js similarity index 100% rename from packages/addon-info/.storybook/user/modify_webpack_config.js rename to addons/info/.storybook/user/modify_webpack_config.js diff --git a/packages/addon-info/.storybook/webpack.config.js b/addons/info/.storybook/webpack.config.js similarity index 100% rename from packages/addon-info/.storybook/webpack.config.js rename to addons/info/.storybook/webpack.config.js diff --git a/packages/addon-info/CHANGELOG.md b/addons/info/CHANGELOG.md similarity index 100% rename from packages/addon-info/CHANGELOG.md rename to addons/info/CHANGELOG.md diff --git a/packages/addon-info/LICENSE b/addons/info/LICENSE similarity index 100% rename from packages/addon-info/LICENSE rename to addons/info/LICENSE diff --git a/packages/addon-info/README.md b/addons/info/README.md similarity index 91% rename from packages/addon-info/README.md rename to addons/info/README.md index 302e5e759386..e99594a435d0 100644 --- a/packages/addon-info/README.md +++ b/addons/info/README.md @@ -15,7 +15,7 @@ npm i -D @storybook/react-storybook-addon-info Then set the addon in the place you configure storybook like this: ```js -import { configure, setAddon } from '@storybook/storybook'; +import { configure, setAddon } from '@storybook/react'; import infoAddon from '@storybook/react-storybook-addon-info'; setAddon(infoAddon); @@ -30,7 +30,7 @@ Then create your stories with the `.addWithInfo` API. ```js import React from 'react'; import Button from './Button'; -import { storiesOf, action } from '@storybook/storybook'; +import { storiesOf, action } from '@storybook/react'; storiesOf('Button') .addWithInfo( diff --git a/packages/addon-info/docs/home-screenshot.png b/addons/info/docs/home-screenshot.png similarity index 100% rename from packages/addon-info/docs/home-screenshot.png rename to addons/info/docs/home-screenshot.png diff --git a/packages/addon-info/example/Button.js b/addons/info/example/Button.js similarity index 100% rename from packages/addon-info/example/Button.js rename to addons/info/example/Button.js diff --git a/packages/addon-info/example/story.js b/addons/info/example/story.js similarity index 96% rename from packages/addon-info/example/story.js rename to addons/info/example/story.js index 750950881d0c..0851469e5419 100644 --- a/packages/addon-info/example/story.js +++ b/addons/info/example/story.js @@ -1,14 +1,13 @@ import React from 'react'; import Button from './Button'; -import { storiesOf } from '@storybook/storybook'; + +import { storiesOf, action } from '@storybook/react'; import { action } from '@storybook/addon-actions'; import backgrounds from 'react-storybook-addon-backgrounds'; storiesOf('Button').addWithInfo( 'simple usage', - ` - This is the basic usage with the button with providing a label to show the text. - `, + `This is the basic usage with the button with providing a label to show the text.`, () => (