Skip to content

Use the prop-types package from npm instead #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
"prepublish": "npm run build"
},
"dependencies": {
"react": "^15.3.2",
"react-dom": "^15.3.2"
"react": "^15.6.0",
"react-dom": "^15.6.0",
"prop-types": "^15.5.10",
},
"keywords": [
"react",
Expand Down
27 changes: 14 additions & 13 deletions src/ResizableComponent.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var React = require('react');
var ReactDOM = require('react-dom');
var PropTypes = require('prop-types');

var ResizableComponent = React.createClass({
getInitialState: function() {
Expand Down Expand Up @@ -39,26 +40,26 @@ var ResizableComponent = React.createClass({
},

propTypes: {
children: React.PropTypes.element.isRequired,
direction: React.PropTypes.oneOf(['s', 'e', 'se']),
children: PropTypes.element.isRequired,
direction: PropTypes.oneOf(['s', 'e', 'se']),

// Dimensions
width: React.PropTypes.number,
height: React.PropTypes.number,
width: PropTypes.number,
height: PropTypes.number,

// Styling
className: React.PropTypes.string,
style: React.PropTypes.object,
ghostCssStyles: React.PropTypes.object,
className: PropTypes.string,
style: PropTypes.object,
ghostCssStyles: PropTypes.object,

// Callbacks
onStartResize: React.PropTypes.func,
onStopResize: React.PropTypes.func,
onEachStep: React.PropTypes.func,
onDuringResize: React.PropTypes.func,
onStartResize: PropTypes.func,
onStopResize: PropTypes.func,
onEachStep: PropTypes.func,
onDuringResize: PropTypes.func,

// Other options
options: React.PropTypes.object
options: PropTypes.object
},

getDefaultProps: function() {
Expand Down Expand Up @@ -313,4 +314,4 @@ var ResizableComponent = React.createClass({
}
});

module.exports = ResizableComponent;
module.exports = ResizableComponent;