Skip to content

Commit 5e7608c

Browse files
committed
Update React to 15.x
1 parent c995810 commit 5e7608c

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
},
2727
"homepage": "https://github.com/team-magneto/react-with-theme#readme",
2828
"dependencies": {
29-
"recompose": "^0.15.1"
29+
"recompose": "^0.17"
3030
},
3131
"peerDependencies": {
32-
"react": "^0.14.0"
32+
"react": "~15"
3333
},
3434
"devDependencies": {
3535
"babel-cli": "^6.6.5",
@@ -41,9 +41,9 @@
4141
"babel-preset-stage-0": "^6.5.0",
4242
"enzyme": "^2.2.0",
4343
"jest-cli": "^0.10.0",
44-
"react": "^0.14.8",
45-
"react-addons-test-utils": "^0.14.8",
46-
"react-dom": "^0.14.8",
44+
"react": "^15.0.0",
45+
"react-addons-test-utils": "^15.0.0",
46+
"react-dom": "^15.0.0",
4747
"webpack": "^1.12.14"
4848
},
4949
"jest": {

src/with-theme.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import React from 'react'
22
import { mapProps, wrapDisplayName } from 'recompose'
3-
import createHelper from 'recompose/createHelper'
43

5-
const withTheme = (themes) => (BaseComponent, transform) => mapProps(
6-
(props) => Object.assign({}, props, transform(themes[props.theme] || themes['default'])),
7-
BaseComponent
8-
)
4+
const withTheme = (themes) => (BaseComponent, transform) =>
5+
mapProps(
6+
(props) => Object.assign({}, props, transform(themes[props.theme] || themes['default']))
7+
)(BaseComponent)
98

10-
export default createHelper(withTheme, 'withTheme')
9+
export default withTheme

0 commit comments

Comments
 (0)