fix storybook (#3292)
parent
b4692f1513
commit
fb854c1014
|
@ -7,7 +7,7 @@
|
||||||
"build:production": "NODE_ENV=production yarn webpack -- --config config/webpack/production.js",
|
"build:production": "NODE_ENV=production yarn webpack -- --config config/webpack/production.js",
|
||||||
"manage:translations": "node ./config/webpack/translationRunner.js",
|
"manage:translations": "node ./config/webpack/translationRunner.js",
|
||||||
"start": "rimraf ./tmp/streaming && babel ./streaming/index.js --out-dir ./tmp && node ./tmp/streaming/index.js",
|
"start": "rimraf ./tmp/streaming && babel ./streaming/index.js --out-dir ./tmp && node ./tmp/streaming/index.js",
|
||||||
"storybook": "start-storybook -p 9001 -c storybook",
|
"storybook": "NODE_ENV=test start-storybook -p 9001 -c storybook",
|
||||||
"test": "npm run test:lint && npm run test:mocha",
|
"test": "npm run test:lint && npm run test:mocha",
|
||||||
"test:lint": "eslint -c .eslintrc.yml --ext=js app/javascript/ config/webpack/ storyboard/ streaming/",
|
"test:lint": "eslint -c .eslintrc.yml --ext=js app/javascript/ config/webpack/ storyboard/ streaming/",
|
||||||
"test:mocha": "NODE_ENV=test mocha --require ./spec/javascript/setup.js --compilers js:babel-register ./spec/javascript/components/*.test.jsx",
|
"test:mocha": "NODE_ENV=test mocha --require ./spec/javascript/setup.js --compilers js:babel-register ./spec/javascript/components/*.test.jsx",
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { IntlProvider } from 'react-intl';
|
import { IntlProvider } from 'react-intl';
|
||||||
import { storiesOf } from '@kadira/storybook';
|
import { storiesOf } from '@kadira/storybook';
|
||||||
import getMessagesForLocale from 'mastodon/locales';
|
import en from 'mastodon/locales/en.json';
|
||||||
import LoadingIndicator from 'mastodon/components/loading_indicator';
|
import LoadingIndicator from 'mastodon/components/loading_indicator';
|
||||||
|
|
||||||
storiesOf('LoadingIndicator', module)
|
storiesOf('LoadingIndicator', module)
|
||||||
.add('default state', () => (
|
.add('default state', () => (
|
||||||
<IntlProvider locale='en' messages={getMessagesForLocale('en')}>
|
<IntlProvider locale='en' messages={en}>
|
||||||
<LoadingIndicator />
|
<LoadingIndicator />
|
||||||
</IntlProvider>
|
</IntlProvider>
|
||||||
));
|
));
|
||||||
|
|
Loading…
Reference in New Issue