Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
rc-react-native-countdown
Advanced tools
A component for react-native
Run npm install rc-react-native-countdown --save
// Within your render function. Count down after press it.
<CountDown
onPress={this.sendAgain} //default null
text={'Try again'} //default ''
time={60} //default 60
buttonStyle={{padding:20}}
textStyle={{color:'black'}} //default black
disabledTextStyle={{color:'gray'}} //default gray
/>
static defaultProps = {
isChecked: false
};
static propTypes = {
isChecked: React.PropTypes.bool
};
constructor(props) {
super(props);
this.state = {
isChecked: props.isChecked
}
}
renderCountDown(){
if (this.state.isChecked) {
return(
<CountDown
onPress={this.sendAgain.bind(this)} //default null
text={'重新获取'} //default ''
time={60} //default 60
buttonStyle={{padding:20}}
textStyle={{color:'black'}} //default black
disabledTextStyle={{color:'gray'}} //default gray
/>)
}
else{
return(
<Text style ={styles.tip} onPress={this.sendCode.bind(this)}>获取验证码</Text>
)
}
}
sendAgain(){
}
sendCode(){
this.setState({ isChecked: !this.state.isChecked });
}
render(){
return (
<View style={styles.container}>
<Text style={styles.tip}>{'CountDown in timestamp \n 以日期-时间为单位的倒计时'}</Text>
<View style={styles.row}>
{this.renderCountDown()}
</View>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'space-around',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
row: {
padding: 7,
backgroundColor: 'red',
borderRadius: 7,
},
tip: {
fontSize: 20,
},
cd: {
textAlign: 'center',
color: 'white',
fontSize: 20,
},
});
FAQs
react native countdown button
We found that rc-react-native-countdown demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.