Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Move i18n spread to div. (#890)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkasper-was-taken authored and bjankord committed Oct 5, 2017
1 parent 05c9a86 commit ba509ed
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 17 deletions.
3 changes: 3 additions & 0 deletions packages/terra-i18n/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Changelog
Unreleased
----------

### Changed
* Spread customProps onto div.

1.9.0 - (September 26, 2017)
------------------
### Changed
Expand Down
8 changes: 4 additions & 4 deletions packages/terra-i18n/src/I18nProvider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ const propTypes = {
messages: PropTypes.object.isRequired,
};

const I18nProvider = (props, ...customProps) => (
<IntlProvider {...customProps} locale={props.locale} key={props.locale} messages={props.messages}>
<div>
{props.children}
const I18nProvider = ({ children, locale, messages, ...customProps }) => (
<IntlProvider locale={locale} key={locale} messages={messages}>
<div {...customProps}>
{children}
</div>
</IntlProvider>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@

exports[`I18nProvider for snapshot tests renders a default I18nProvider 1`] = `
<IntlProvider
0={Object {}}
1={
Object {
"enqueueCallback": [Function],
"enqueueCallbackInternal": [Function],
"enqueueElementInternal": [Function],
"enqueueForceUpdate": [Function],
"enqueueReplaceState": [Function],
"enqueueSetState": [Function],
"isMounted": [Function],
"validateCallback": [Function],
}
}
locale="en"
messages={
Object {
Expand Down

0 comments on commit ba509ed

Please sign in to comment.