Skip to content

Commit 1155243

Browse files
committed
Migrate to prop-types package
1 parent 3b17610 commit 1155243

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@
4949
"babel-preset-env": "^1.3.2",
5050
"babel-preset-react": "^6.23.0",
5151
"jest": "^20.0.1",
52-
"react": "^15.5.4"
52+
"react": "^15.5.4",
53+
"prop-types": "^15.5.10"
5354
},
5455
"peerDependencies": {
55-
"react": "^15.5.0"
56+
"react": "^15.5.0",
57+
"prop-types": "^15.5.7"
5658
}
5759
}

src/index.jsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// even though React doesn't support pointer events yet.
44

55
import React from 'react';
6+
import PropTypes from 'prop-types';
67

78

89
// A mapping of pointer event props to event names.
@@ -59,16 +60,16 @@ class Pointable extends React.Component {
5960

6061

6162
Pointable.propTypes = {
62-
tagName: React.PropTypes.string.isRequired,
63-
touchAction: React.PropTypes.oneOf(['auto', 'none', 'pan-x', 'pan-y', 'manipulation']).isRequired,
64-
onPointerMove: React.PropTypes.func,
65-
onPointerDown: React.PropTypes.func,
66-
onPointerUp: React.PropTypes.func,
67-
onPointerOver: React.PropTypes.func,
68-
onPointerOut: React.PropTypes.func,
69-
onPointerEnter: React.PropTypes.func,
70-
onPointerLeave: React.PropTypes.func,
71-
onPointerCancel: React.PropTypes.func
63+
tagName: PropTypes.string.isRequired,
64+
touchAction: PropTypes.oneOf(['auto', 'none', 'pan-x', 'pan-y', 'manipulation']).isRequired,
65+
onPointerMove: PropTypes.func,
66+
onPointerDown: PropTypes.func,
67+
onPointerUp: PropTypes.func,
68+
onPointerOver: PropTypes.func,
69+
onPointerOut: PropTypes.func,
70+
onPointerEnter: PropTypes.func,
71+
onPointerLeave: PropTypes.func,
72+
onPointerCancel: PropTypes.func
7273
};
7374

7475
Pointable.defaultProps = {

0 commit comments

Comments
 (0)