Skip to content

Commit b03bf16

Browse files
committed
upgrade to react 16, bring in some fixes madflanderz caught a long ass time ago
1 parent 26622b1 commit b03bf16

File tree

6 files changed

+19
-21
lines changed

6 files changed

+19
-21
lines changed

__tests__/index-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ jest.unmock('../src/index');
22

33
import React from 'react';
44
import ReactDOM from 'react-dom';
5-
import TestUtils from 'react-addons-test-utils';
5+
import TestUtils from 'react-dom/test-utils';
66
import index from '../src/index'
77

88
describe('<index />', () => {

demo/react-toggle-buttonDemo.js

Lines changed: 5 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-toggle-button",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"description": "A React Component.",
55
"main": "./lib/index.js",
66
"scripts": {
@@ -20,7 +20,8 @@
2020
"keywords": [
2121
"react",
2222
"reactjs",
23-
"react-component"
23+
"react-component",
24+
"toggle-button"
2425
]
2526
},
2627
"author": "",
@@ -32,8 +33,7 @@
3233
"jest": {
3334
"unmockedModulePathPatterns": [
3435
"<rootDir>/node_modules/react",
35-
"<rootDir>/node_modules/react-dom",
36-
"<rootDir>/node_modules/react-addons-test-utils"
36+
"<rootDir>/node_modules/react-dom"
3737
]
3838
},
3939
"devDependencies": {
@@ -50,11 +50,8 @@
5050
"eslint-plugin-jsx-a11y": "^1.5.3",
5151
"eslint-plugin-react": "^5.2.2",
5252
"jest-cli": "^13.0.0",
53-
"react": "^15.3.1",
54-
"react-addons-css-transition-group": "^15.1.0",
55-
"react-addons-perf": "^15.1.0",
56-
"react-addons-test-utils": "^15.1.0",
57-
"react-dom": "^15.3.1",
53+
"react": "^16.1.1",
54+
"react-dom": "^16.1.1",
5855
"webpack": "^1.13.1",
5956
"webpack-dev-server": "^1.14.1"
6057
},
@@ -63,6 +60,6 @@
6360
},
6461
"dependencies": {
6562
"prop-types": "^15.6.0",
66-
"react-motion": "^0.4.4"
63+
"react-motion": "^0.5.2"
6764
}
6865
}

src/iconExamples.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const Check = () => (
3333
</title>
3434
<path
3535
d="M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0"
36-
fill="#fff" fill-rule="evenodd"
36+
fill="#fff" fillRule="evenodd"
3737
/>
3838
</svg>
3939
);
@@ -45,7 +45,7 @@ export const X = () => (
4545
</title>
4646
<path
4747
d="M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12"
48-
fill="#fff" fill-rule="evenodd"
48+
fill="#fff" fillRule="evenodd"
4949
/>
5050
</svg>
5151
);

src/react-toggle-button.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ export default class ToggleButton extends Component {
192192
containerStyle,
193193
trackStyle,
194194
animateTrackStyleToggle,
195+
animateTrackStyleHover,
196+
thumbStyleHover,
195197
trackStyleHover,
196198
activeLabelStyle,
197199
activeLabelStyleHover,

0 commit comments

Comments
 (0)