houdini/.storybook/preview.js
2020-07-16 02:52:33 -05:00

13 lines
No EOL
330 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)