2020-07-15 17:41:20 +00:00
|
|
|
import { addDecorator } from '@storybook/react';
|
2020-09-23 18:38:44 +00:00
|
|
|
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',
|
2020-10-09 00:00:01 +00:00
|
|
|
// 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)
|