From e4b86f073069cc93b4bcb4c559db24d684d3002c Mon Sep 17 00:00:00 2001 From: Aidan Gauland Date: Tue, 26 Dec 2017 11:55:15 +1300 Subject: [PATCH] Fix use of deprecated module Use PropTypes from "prop-types" instead of the deprecated React.PropTypes submodule. --- src/components/views/elements/DialogButtons.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/views/elements/DialogButtons.js b/src/components/views/elements/DialogButtons.js index e730bfb377..4f22d43ae0 100644 --- a/src/components/views/elements/DialogButtons.js +++ b/src/components/views/elements/DialogButtons.js @@ -17,6 +17,7 @@ limitations under the License. "use strict"; import React from "react"; +import PropTypes from "prop-types"; import { _t } from '../../../languageHandler'; /** @@ -27,15 +28,15 @@ module.exports = React.createClass({ propTypes: { // The primary button which is styled differently and has default focus. - primaryButton: React.PropTypes.node.isRequired, + primaryButton: PropTypes.node.isRequired, // onClick handler for the primary button. - onPrimaryButtonClick: React.PropTypes.func.isRequired, + onPrimaryButtonClick: PropTypes.func.isRequired, // onClick handler for the cancel button. - onCancel: React.PropTypes.func.isRequired, + onCancel: PropTypes.func.isRequired, - focus: React.PropTypes.bool, + focus: PropTypes.bool, }, render: function() {