Skip to content

Commit 62d8726

Browse files
committed
add prop-types package
1 parent f7ad731 commit 62d8726

3 files changed

Lines changed: 16 additions & 10 deletions

File tree

dist/listScrollBound.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ var _react = require('react');
66

77
var _react2 = _interopRequireDefault(_react);
88

9+
var _propTypes = require('prop-types');
10+
11+
var _propTypes2 = _interopRequireDefault(_propTypes);
12+
913
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1014

1115
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -20,7 +24,7 @@ var ListScrollBound = function (_Component) {
2024
function ListScrollBound(props) {
2125
_classCallCheck(this, ListScrollBound);
2226

23-
return _possibleConstructorReturn(this, Object.getPrototypeOf(ListScrollBound).call(this, props));
27+
return _possibleConstructorReturn(this, (ListScrollBound.__proto__ || Object.getPrototypeOf(ListScrollBound)).call(this, props));
2428
}
2529

2630
_createClass(ListScrollBound, [{
@@ -60,11 +64,11 @@ var ListScrollBound = function (_Component) {
6064
}(_react.Component);
6165

6266
ListScrollBound.propTypes = {
63-
id: _react.PropTypes.string,
64-
tagName: _react.PropTypes.string,
65-
className: _react.PropTypes.string,
66-
onClick: _react.PropTypes.func,
67-
onWheel: _react.PropTypes.func
67+
id: _propTypes2.default.string,
68+
tagName: _propTypes2.default.string,
69+
className: _propTypes2.default.string,
70+
onClick: _propTypes2.default.func,
71+
onWheel: _propTypes2.default.func
6872
};
6973

7074
ListScrollBound.defaultProps = {

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-list-scroll-bound",
3-
"version": "15.0.6",
3+
"version": "15.5.4",
44
"description": "prevent body scrolling, if list border reached, to get a better experience",
55
"main": "dist/listScrollBound.js",
66
"repository": {
@@ -31,7 +31,8 @@
3131
"babel-preset-react": "^6.5.0"
3232
},
3333
"peerDependencies": {
34-
"react": "^0.14.0 || ^15.0.1",
35-
"react-dom": "^0.14.0 || ^15.0.1"
34+
"react": "^0.14.0 || ^15.5.0",
35+
"prop-types": "^15.5.8",
36+
"react-dom": "^0.14.0 || ^15.5.0"
3637
}
3738
}

src/listScrollBound.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

3-
import React, { Component, PropTypes } from 'react';
3+
import React, { Component } from 'react';
4+
import PropTypes from 'prop-types';
45

56
class ListScrollBound extends Component {
67

0 commit comments

Comments
 (0)