houdini/.storybook/react/preview.js

14 lines
419 B
JavaScript
Raw Normal View History

2020-07-15 17:41:20 +00:00
import { addDecorator } from '@storybook/react';
import { withIntl, setIntlConfig } from '../../app/javascript/components/tests/intl';
2020-07-15 17:41:20 +00:00
const messages = {
'en': { 'button.label': 'Click me!' },
}
setIntlConfig({
locales: ['en', 'de'],
defaultLocale: 'en',
// we use this form becuase it allows the story to be viewed in IE11
getMessages: function(locale) { return messages[locale]}
2020-07-15 17:41:20 +00:00
});
addDecorator(withIntl)