mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 17:45:52 -05:00
Merge pull request #7387 from aoneill01/fix/react-intl-text-component
fix: use span for localized messages
This commit is contained in:
commit
09dbe895da
2 changed files with 7 additions and 1 deletions
|
@ -39,6 +39,7 @@ const render = (jsx, element, reducers, initialState, enhancer) => {
|
|||
<IntlProvider
|
||||
locale={intlLocale}
|
||||
messages={messages}
|
||||
textComponent="span"
|
||||
>
|
||||
{jsx}
|
||||
</IntlProvider>
|
||||
|
|
|
@ -39,7 +39,12 @@ const mountWithIntl = (node, {context, childContextTypes} = {}) => {
|
|||
|
||||
// react-test-renderer component for use with snapshot testing
|
||||
const componentWithIntl = (children, props = {locale: 'en'}) => renderer.create(
|
||||
<IntlProvider {...props}>{children}</IntlProvider>
|
||||
<IntlProvider
|
||||
textComponent="span"
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</IntlProvider>
|
||||
);
|
||||
|
||||
export {
|
||||
|
|
Loading…
Reference in a new issue