Skip to content

Commit

Permalink
Use prop-types package instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Kagami committed Sep 25, 2017
1 parent 82a1043 commit 95db181
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

const path = require("path");
const React = require("react");
const PropTypes = require("prop-types");

/**
* The MIME type associated with mpv.js plugin.
Expand Down Expand Up @@ -188,26 +189,26 @@ ReactMPV.propTypes = {
/**
* The CSS class name of the plugin element.
*/
className: React.PropTypes.string,
className: PropTypes.string,
/**
* Override the inline-styles of the plugin element.
*/
style: React.PropTypes.object,
style: PropTypes.object,
/**
* Callback function that is fired when mpv is ready to accept
* commands.
*
* @param {Object} mpv - Component instance
*/
onReady: React.PropTypes.func,
onReady: PropTypes.func,
/**
* Callback function that is fired when one of the observed properties
* changes.
*
* @param {string} name - Property name
* @param {*} value - Property value
*/
onPropertyChange: React.PropTypes.func,
onPropertyChange: PropTypes.func,
};

module.exports = {PLUGIN_MIME_TYPE, getPluginEntry, ReactMPV};
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"url": "https://github.com/Kagami/mpv.js/issues"
},
"dependencies": {
"prebuild-install": "^2.1.1"
"prebuild-install": "^2.1.1",
"prop-types": "^15.5.10"
},
"peerDependencies": {
"react": "^15.3.0"
Expand Down

0 comments on commit 95db181

Please sign in to comment.