houdini/.storybook/react/preview.js
2020-09-24 11:00:33 -05:00

13 lines
No EOL
333 B
JavaScript

import { addDecorator } from '@storybook/react';
import { withIntl, setIntlConfig } from '../../app/javascript/components/tests/intl';
const messages = {
'en': { 'button.label': 'Click me!' },
}
setIntlConfig({
locales: ['en', 'de'],
defaultLocale: 'en',
getMessages: (locale) => messages[locale]
});
addDecorator(withIntl)