houdini/.storybook/react/preview.js

13 lines
333 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',
getMessages: (locale) => messages[locale]
});
addDecorator(withIntl)