Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const { size } = this.props;
return (
);
}
}
AvatarRound.propTypes = {
size: React.PropTypes.number.isRequired,
nick: React.PropTypes.string.isRequired
};
default:
label = '';
}
return (
);
}
}
BannerOffline.propTypes = {
connectionStatus: React.PropTypes.oneOf([ 'offline', 'connecting', 'online' ])
};
);
} else {
return (
);
}
},
});
const InputField = React.createClass({
propTypes:{
//Input field configuration used for setting up.
config:React.PropTypes.object,
//Call when input text changes.
diffCallback:React.PropTypes.func,
//Keep the original value for diff checking.
originValue:React.PropTypes.string,
//Call when inputField is focused.
onFocusCallback:React.PropTypes.func,
//Call when press return.
onSubmitEditing:React.PropTypes.func,
},
getInitialState() {
return {
//The text of input field.
value:this.props.originValue,
//Used for display email list.
emaliListViewHeight:0,
render(){
return (
)
}
};
Notes.propTypes = {
userInfo: React.PropTypes.object.isRequired,
notes: React.PropTypes.object.isRequired
}
module.exports = Notes;
}
}
const mapDispatchToProps = (dispatch) => {
return {
registerRequest: (creds) => dispatch(registerRequest(creds)),
registerSuccess: (user) => dispatch(registerSuccess(user)),
registerFailure: (errorMessage) => dispatch(registerFailure(errorMessage)),
loginSuccess: (user) => dispatch(loginSuccess(user)),
loginFailure: (errorMessage) => dispatch(loginFailure(errorMessage))
};
}
Register.propTypes = {
currentUser: React.PropTypes.object.isRequired,
registerRequest: React.PropTypes.func.isRequired,
registerSuccess: React.PropTypes.func.isRequired,
registerFailure: React.PropTypes.func.isRequired,
loginSuccess: React.PropTypes.func.isRequired,
loginFailure: React.PropTypes.func.isRequired,
navigator: React.PropTypes.object.isRequired
}
export default connect(
mapStateToProps,
mapDispatchToProps
)(Register);
import React, {Text, View, Image, TouchableOpacity} from 'react-native';
import Component from '../components/component.react';
import style from './header.style';
export default class Header extends Component {
static propTypes = {
backButtonAction: React.PropTypes.func,
menuButtonAction: React.PropTypes.func,
title: React.PropTypes.string.isRequired
}
render() {
const {title, menuButtonAction, backButtonAction} = this.props;
return (
this._input = c}
value={this.state.value}
onChange={this._onChange.bind(this)}
style={this.props.inputStyle}
multiline
/>
);
}
}
GrowingTextInput.propTypes = {
value: React.PropTypes.string,
defaultValue: React.PropTypes.string,
placeholder: React.PropTypes.string,
numberOfLines: React.PropTypes.number,
onChange: React.PropTypes.func,
onValueChange: React.PropTypes.func,
inputStyle: React.PropTypes.any
};
var React = require('react-native');
var Dimensions = require('Dimensions');
var screen = Dimensions.get('window');
var {
StyleSheet,
View,
Animated,
} = React;
var Modal = React.createClass({
propTypes: {
children: React.PropTypes.node.isRequired,
isOpen: React.PropTypes.bool.isRequired,
},
getInitialState: function() {
return {
position: new Animated.Value(this.props.isOpen ? 0 : screen.height),
visible: this.props.isOpen,
};
},
componentWillReceiveProps(nextProps) {
if (!this.props.isOpen && nextProps.isOpen) {
this.animateOpen();
} else if (this.props.isOpen && !nextProps.isOpen) {
this.animateClose();
}
},
flexDirection: 'column',
},
});
class Web extends React.Component{
render() {
return (
);
}
};
Web.propTypes = {
url: React.PropTypes.string.isRequired
};
module.exports = Web;
(this.props.hashtags.length !== nextProps.hashtags.length) ||
!this.props.hashtags.every((el, i) => el === nextProps.hashtags[i])
);
}
render() {
return (
);
}
}
CardHashtags.propTypes = {
hashtags: React.PropTypes.arrayOf(React.PropTypes.string)
};