Merge pull request #7387 from aoneill01/fix/react-intl-text-component

fix: use span for localized messages
This commit is contained in:
Andy O'Neill 2023-02-22 10:39:17 -05:00 committed by GitHub
commit 09dbe895da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -39,6 +39,7 @@ const render = (jsx, element, reducers, initialState, enhancer) => {
<IntlProvider
locale={intlLocale}
messages={messages}
textComponent="span"
>
{jsx}
</IntlProvider>

View file

@ -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 {