Use prop-types
parent
f8de1584d1
commit
3095db4837
|
|
@ -1,6 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
|
||||
import Logger from '../Logger';
|
||||
import muiTheme from './muiTheme';
|
||||
|
|
@ -51,6 +52,6 @@ export default class App extends React.Component
|
|||
|
||||
App.propTypes =
|
||||
{
|
||||
peerId : React.PropTypes.string.isRequired,
|
||||
roomId : React.PropTypes.string.isRequired
|
||||
peerId : PropTypes.string.isRequired,
|
||||
roomId : PropTypes.string.isRequired
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import IconButton from 'material-ui/IconButton/IconButton';
|
||||
import MicOffIcon from 'material-ui/svg-icons/av/mic-off';
|
||||
import VideoCamOffIcon from 'material-ui/svg-icons/av/videocam-off';
|
||||
|
|
@ -141,15 +142,15 @@ export default class LocalVideo extends React.Component
|
|||
|
||||
LocalVideo.propTypes =
|
||||
{
|
||||
peerId : React.PropTypes.string.isRequired,
|
||||
stream : React.PropTypes.object,
|
||||
resolution : React.PropTypes.string,
|
||||
multipleWebcams : React.PropTypes.bool.isRequired,
|
||||
webcamType : React.PropTypes.string,
|
||||
connectionState : React.PropTypes.string,
|
||||
isActiveSpeaker : React.PropTypes.bool.isRequired,
|
||||
onMicMute : React.PropTypes.func.isRequired,
|
||||
onWebcamToggle : React.PropTypes.func.isRequired,
|
||||
onWebcamChange : React.PropTypes.func.isRequired,
|
||||
onResolutionChange : React.PropTypes.func.isRequired
|
||||
peerId : PropTypes.string.isRequired,
|
||||
stream : PropTypes.object,
|
||||
resolution : PropTypes.string,
|
||||
multipleWebcams : PropTypes.bool.isRequired,
|
||||
webcamType : PropTypes.string,
|
||||
connectionState : PropTypes.string,
|
||||
isActiveSpeaker : PropTypes.bool.isRequired,
|
||||
onMicMute : PropTypes.func.isRequired,
|
||||
onWebcamToggle : PropTypes.func.isRequired,
|
||||
onWebcamChange : PropTypes.func.isRequired,
|
||||
onResolutionChange : PropTypes.func.isRequired
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import IconButton from 'material-ui/IconButton/IconButton';
|
||||
import VolumeOffIcon from 'material-ui/svg-icons/av/volume-off';
|
||||
import VideoOffIcon from 'material-ui/svg-icons/av/videocam-off';
|
||||
|
|
@ -128,10 +129,10 @@ export default class RemoteVideo extends React.Component
|
|||
|
||||
RemoteVideo.propTypes =
|
||||
{
|
||||
peer : React.PropTypes.object.isRequired,
|
||||
stream : React.PropTypes.object.isRequired,
|
||||
fullsize : React.PropTypes.bool,
|
||||
isActiveSpeaker : React.PropTypes.bool.isRequired,
|
||||
onDisableVideo : React.PropTypes.func.isRequired,
|
||||
onEnableVideo : React.PropTypes.func.isRequired
|
||||
peer : PropTypes.object.isRequired,
|
||||
stream : PropTypes.object.isRequired,
|
||||
fullsize : PropTypes.bool,
|
||||
isActiveSpeaker : PropTypes.bool.isRequired,
|
||||
onDisableVideo : PropTypes.func.isRequired,
|
||||
onEnableVideo : PropTypes.func.isRequired
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import ClipboardButton from 'react-clipboard.js';
|
||||
import browser from 'bowser';
|
||||
import TransitionAppear from './TransitionAppear';
|
||||
|
|
@ -496,8 +497,8 @@ export default class Room extends React.Component
|
|||
|
||||
Room.propTypes =
|
||||
{
|
||||
peerId : React.PropTypes.string.isRequired,
|
||||
roomId : React.PropTypes.string.isRequired,
|
||||
onNotify : React.PropTypes.func.isRequired,
|
||||
onHideNotification : React.PropTypes.func.isRequired
|
||||
peerId : PropTypes.string.isRequired,
|
||||
roomId : PropTypes.string.isRequired,
|
||||
onNotify : PropTypes.func.isRequired,
|
||||
onHideNotification : PropTypes.func.isRequired
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import browser from 'bowser';
|
||||
import Logger from '../Logger';
|
||||
|
||||
|
|
@ -492,6 +493,6 @@ export default class Stats extends React.Component
|
|||
|
||||
Stats.propTypes =
|
||||
{
|
||||
stats : React.PropTypes.object.isRequired,
|
||||
onClose : React.PropTypes.func.isRequired
|
||||
stats : PropTypes.object.isRequired,
|
||||
onClose : PropTypes.func.isRequired
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
'use strict';
|
||||
|
||||
import React from 'react';
|
||||
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
|
||||
import PropTypes from 'prop-types';
|
||||
import TransitionGroup from 'react-transition-group/TransitionGroup';
|
||||
|
||||
const DEFAULT_DURATION = 1000;
|
||||
|
||||
|
|
@ -18,7 +19,7 @@ export default class TransitionAppear extends React.Component
|
|||
let duration = props.hasOwnProperty('duration') ? props.duration : DEFAULT_DURATION;
|
||||
|
||||
return (
|
||||
<ReactCSSTransitionGroup
|
||||
<TransitionGroup
|
||||
component={FakeTransitionWrapper}
|
||||
transitionName='transition'
|
||||
transitionAppear={!!duration}
|
||||
|
|
@ -27,15 +28,15 @@ export default class TransitionAppear extends React.Component
|
|||
transitionLeave={false}
|
||||
>
|
||||
{this.props.children}
|
||||
</ReactCSSTransitionGroup>
|
||||
</TransitionGroup>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
TransitionAppear.propTypes =
|
||||
{
|
||||
children : React.PropTypes.any,
|
||||
duration : React.PropTypes.number
|
||||
children : PropTypes.any,
|
||||
duration : PropTypes.number
|
||||
};
|
||||
|
||||
class FakeTransitionWrapper extends React.Component
|
||||
|
|
@ -55,5 +56,5 @@ class FakeTransitionWrapper extends React.Component
|
|||
|
||||
FakeTransitionWrapper.propTypes =
|
||||
{
|
||||
children : React.PropTypes.any
|
||||
children : PropTypes.any
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Logger from '../Logger';
|
||||
import classnames from 'classnames';
|
||||
import hark from 'hark';
|
||||
|
|
@ -229,10 +230,10 @@ export default class Video extends React.Component
|
|||
|
||||
Video.propTypes =
|
||||
{
|
||||
stream : React.PropTypes.object.isRequired,
|
||||
resolution : React.PropTypes.string,
|
||||
muted : React.PropTypes.bool,
|
||||
videoDisabled : React.PropTypes.bool,
|
||||
mirror : React.PropTypes.bool,
|
||||
onResolutionChange : React.PropTypes.func
|
||||
stream : PropTypes.object.isRequired,
|
||||
resolution : PropTypes.string,
|
||||
muted : PropTypes.bool,
|
||||
videoDisabled : PropTypes.bool,
|
||||
mirror : PropTypes.bool,
|
||||
onResolutionChange : PropTypes.func
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue