Skip to content

Commit

Permalink
fix(preview/containers/WithIntl): remove reliance on IntlProvider pro…
Browse files Browse the repository at this point in the history
…pTypes

Closes #4
  • Loading branch information
dcheng168 authored and floriangosse committed Aug 27, 2017
1 parent b1e47a3 commit c73f48e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@
"react": "^15.5.4",
"react-addons-test-utils": "^15.5.0",
"react-dom": "^15.5.4",
"react-intl": "^2.3.0",
"react-test-renderer": "^15.5.0",
"shelljs": "^0.7.4"
},
"peerDependencies": {
"@storybook/react": "^3.1.0",
"react": "^15.4.0",
"react-intl": "^2.2.0"
"react-intl": "^2.3.0"
},
"engines": {
"node": ">=6"
Expand Down
10 changes: 9 additions & 1 deletion src/preview/containers/WithIntl/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,15 @@ class WithIntl extends React.Component {
}

WithIntl.propTypes = {
intlConfig: PropTypes.shape(omit(IntlProvider.propTypes, ['children'])).isRequired,
intlConfig: PropTypes.shape({
locale: PropTypes.string,
formats: PropTypes.object,
messages: PropTypes.object,
textComponent: PropTypes.any,
defaultLocale : PropTypes.string,
initialNow: PropTypes.any,
defaultFormats: PropTypes.object
}).isRequired,
locales: PropTypes.arrayOf(PropTypes.string).isRequired,
getMessages: PropTypes.func.isRequired,
channel: PropTypes.shape({
Expand Down

0 comments on commit c73f48e

Please sign in to comment.