mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-30 10:58:23 -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
|
<IntlProvider
|
||||||
locale={intlLocale}
|
locale={intlLocale}
|
||||||
messages={messages}
|
messages={messages}
|
||||||
|
textComponent="span"
|
||||||
>
|
>
|
||||||
{jsx}
|
{jsx}
|
||||||
</IntlProvider>
|
</IntlProvider>
|
||||||
|
|
|
@ -39,7 +39,12 @@ const mountWithIntl = (node, {context, childContextTypes} = {}) => {
|
||||||
|
|
||||||
// react-test-renderer component for use with snapshot testing
|
// react-test-renderer component for use with snapshot testing
|
||||||
const componentWithIntl = (children, props = {locale: 'en'}) => renderer.create(
|
const componentWithIntl = (children, props = {locale: 'en'}) => renderer.create(
|
||||||
<IntlProvider {...props}>{children}</IntlProvider>
|
<IntlProvider
|
||||||
|
textComponent="span"
|
||||||
|
{...props}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</IntlProvider>
|
||||||
);
|
);
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
|
Loading…
Reference in a new issue