Skip to content

Commit 31f9c5f

Browse files
committed
Add prop-types package
1 parent a52fc49 commit 31f9c5f

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

index.js

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

1111
var _react2 = _interopRequireDefault(_react);
1212

13+
var _propTypes = require('prop-types');
14+
15+
var _propTypes2 = _interopRequireDefault(_propTypes);
16+
1317
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1418

1519
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -20,12 +24,12 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
2024

2125

2226
var propTypes = {
23-
table: _react.PropTypes.string.isRequired,
24-
filename: _react.PropTypes.string.isRequired,
25-
sheet: _react.PropTypes.string.isRequired,
26-
id: _react.PropTypes.string,
27-
className: _react.PropTypes.string,
28-
buttonText: _react.PropTypes.string
27+
table: _propTypes2.default.string.isRequired,
28+
filename: _propTypes2.default.string.isRequired,
29+
sheet: _propTypes2.default.string.isRequired,
30+
id: _propTypes2.default.string,
31+
className: _propTypes2.default.string,
32+
buttonText: _propTypes2.default.string
2933
};
3034

3135
var ReactHTMLTableToExcel = function (_Component) {

package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,12 @@
2828
"babel-cli": "^6.24.1",
2929
"babel-preset-es2015": "^6.24.1",
3030
"babel-preset-react": "^6.24.1",
31-
"babel-preset-stage-0": "^6.24.1",
32-
"react": "^15.5.4"
31+
"babel-preset-stage-0": "^6.24.1"
3332
},
34-
"dependencies": {}
33+
"dependencies": {
34+
"prop-types": "^15.5.7"
35+
},
36+
"peerDependencies": {
37+
"react": "^15.5.0"
38+
}
3539
}

src/ReactHTMLTableToExcel.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* global window, document */
2-
import React, {Component, PropTypes} from 'react';
2+
import React, {Component} from 'react';
3+
import PropTypes from 'prop-types';
34

45
const propTypes = {
56
table: PropTypes.string.isRequired,

0 commit comments

Comments
 (0)