Browse Source

Upgrade storybook to v3 (#3558)

pull/4/head
Yamagishi Kazutoshi 5 years ago
committed by Eugen Rochko
parent
commit
b0fe58dc69
8 changed files with 501 additions and 547 deletions
  1. +2
    -1
      package.json
  2. +1
    -2
      storybook/config.js
  3. +2
    -1
      storybook/stories/autosuggest_textarea.story.js
  4. +2
    -1
      storybook/stories/button.story.js
  5. +2
    -1
      storybook/stories/character_counter.story.js
  6. +2
    -1
      storybook/stories/loading_indicator.story.js
  7. +4
    -6
      storybook/webpack.config.js
  8. +486
    -534
      yarn.lock

+ 2
- 1
package.json View File

@ -111,7 +111,8 @@
"websocket.js": "^0.1.7"
},
"devDependencies": {
"@kadira/storybook": "^2.35.3",
"@storybook/addon-actions": "^3.0.0",
"@storybook/react": "^3.0.0",
"babel-eslint": "^7.2.3",
"chai": "^4.0.1",
"chai-enzyme": "^0.7.1",

+ 1
- 2
storybook/config.js View File

@ -1,6 +1,5 @@
import { configure, setAddon } from '@kadira/storybook';
import { configure } from '@storybook/react';
import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
import { addLocaleData } from 'react-intl';
import en from 'react-intl/locale-data/en';
import '../app/javascript/styles/application.scss';

+ 2
- 1
storybook/stories/autosuggest_textarea.story.js View File

@ -1,6 +1,7 @@
import React from 'react';
import { List } from 'immutable';
import { action, storiesOf } from '@kadira/storybook';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import AutosuggestTextarea from 'mastodon/components/autosuggest_textarea';
const props = {

+ 2
- 1
storybook/stories/button.story.js View File

@ -1,5 +1,6 @@
import React from 'react';
import { action, storiesOf } from '@kadira/storybook';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import Button from 'mastodon/components/button';
storiesOf('Button', module)

+ 2
- 1
storybook/stories/character_counter.story.js View File

@ -1,5 +1,6 @@
import React from 'react';
import { storiesOf } from '@kadira/storybook';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import CharacterCounter from 'mastodon/features/compose/components/character_counter';
storiesOf('CharacterCounter', module)

+ 2
- 1
storybook/stories/loading_indicator.story.js View File

@ -1,6 +1,7 @@
import React from 'react';
import { IntlProvider } from 'react-intl';
import { storiesOf } from '@kadira/storybook';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import en from 'mastodon/locales/en.json';
import LoadingIndicator from 'mastodon/components/loading_indicator';

+ 4
- 6
storybook/webpack.config.js View File

@ -2,7 +2,7 @@ const path = require('path');
module.exports = {
module: {
loaders: [
rules: [
{
test: /\.(jpg|jpeg|png|gif|svg|eot|ttf|woff|woff2)$/i,
loader: 'url-loader',
@ -14,10 +14,8 @@ module.exports = {
],
},
resolve: {
modulesDirectories: [
path.resolve(__dirname, '..', 'storybook'),
path.resolve(__dirname, '..', 'app', 'javascript'),
path.resolve(__dirname, '..', 'node_modules'),
],
alias: {
mastodon: path.resolve(__dirname, '..', 'app', 'javascript', 'mastodon'),
},
},
};

+ 486
- 534
yarn.lock
File diff suppressed because it is too large
View File


Loading…
Cancel
Save