Remove use of deprecated React.PropTypes
Replace all uses of React.PropTypes with PropTypes and importing PropTypes from 'prop-types'.
This commit is contained in:
parent
b5f6d97fa2
commit
35780f5ae0
123 changed files with 750 additions and 632 deletions
|
@ -15,6 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import RoomViewStore from '../../../stores/RoomViewStore';
|
||||
import CallHandler from '../../../CallHandler';
|
||||
import dis from '../../../dispatcher';
|
||||
|
@ -27,7 +28,7 @@ module.exports = React.createClass({
|
|||
// A Conference Handler implementation
|
||||
// Must have a function signature:
|
||||
// getConferenceCallForRoom(roomId: string): MatrixCall
|
||||
ConferenceHandler: React.PropTypes.object,
|
||||
ConferenceHandler: PropTypes.object,
|
||||
},
|
||||
|
||||
getInitialState: function() {
|
||||
|
|
|
@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import dis from '../../../dispatcher';
|
||||
import CallHandler from '../../../CallHandler';
|
||||
import sdk from '../../../index';
|
||||
|
@ -26,25 +27,25 @@ module.exports = React.createClass({
|
|||
propTypes: {
|
||||
// js-sdk room object. If set, we will only show calls for the given
|
||||
// room; if not, we will show any active call.
|
||||
room: React.PropTypes.object,
|
||||
room: PropTypes.object,
|
||||
|
||||
// A Conference Handler implementation
|
||||
// Must have a function signature:
|
||||
// getConferenceCallForRoom(roomId: string): MatrixCall
|
||||
ConferenceHandler: React.PropTypes.object,
|
||||
ConferenceHandler: PropTypes.object,
|
||||
|
||||
// maxHeight style attribute for the video panel
|
||||
maxVideoHeight: React.PropTypes.number,
|
||||
maxVideoHeight: PropTypes.number,
|
||||
|
||||
// a callback which is called when the user clicks on the video div
|
||||
onClick: React.PropTypes.func,
|
||||
onClick: PropTypes.func,
|
||||
|
||||
// a callback which is called when the content in the callview changes
|
||||
// in a way that is likely to cause a resize.
|
||||
onResize: React.PropTypes.func,
|
||||
onResize: PropTypes.func,
|
||||
|
||||
// render ongoing audio call details - useful when in LeftPanel
|
||||
showVoice: React.PropTypes.bool,
|
||||
showVoice: PropTypes.bool,
|
||||
},
|
||||
|
||||
getInitialState: function() {
|
||||
|
|
|
@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import MatrixClientPeg from '../../../MatrixClientPeg';
|
||||
import dis from '../../../dispatcher';
|
||||
import { _t } from '../../../languageHandler';
|
||||
|
@ -22,7 +23,7 @@ module.exports = React.createClass({
|
|||
displayName: 'IncomingCallBox',
|
||||
|
||||
propTypes: {
|
||||
incomingCall: React.PropTypes.object,
|
||||
incomingCall: PropTypes.object,
|
||||
},
|
||||
|
||||
onAnswerClick: function() {
|
||||
|
|
|
@ -17,17 +17,18 @@ limitations under the License.
|
|||
'use strict';
|
||||
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
module.exports = React.createClass({
|
||||
displayName: 'VideoFeed',
|
||||
|
||||
propTypes: {
|
||||
// maxHeight style attribute for the video element
|
||||
maxHeight: React.PropTypes.number,
|
||||
maxHeight: PropTypes.number,
|
||||
|
||||
// a callback which is called when the video element is resized
|
||||
// due to a change in video metadata
|
||||
onResize: React.PropTypes.func,
|
||||
onResize: PropTypes.func,
|
||||
},
|
||||
|
||||
componentDidMount() {
|
||||
|
|
|
@ -18,6 +18,7 @@ limitations under the License.
|
|||
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import sdk from '../../../index';
|
||||
|
@ -30,14 +31,14 @@ module.exports = React.createClass({
|
|||
|
||||
propTypes: {
|
||||
// maxHeight style attribute for the video element
|
||||
maxHeight: React.PropTypes.number,
|
||||
maxHeight: PropTypes.number,
|
||||
|
||||
// a callback which is called when the user clicks on the video div
|
||||
onClick: React.PropTypes.func,
|
||||
onClick: PropTypes.func,
|
||||
|
||||
// a callback which is called when the video element is resized due to
|
||||
// a change in video metadata
|
||||
onResize: React.PropTypes.func,
|
||||
onResize: PropTypes.func,
|
||||
},
|
||||
|
||||
componentDidMount: function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue