
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
react-native-elements-prompt
Advanced tools
Based on react native elements buttons and react native modal.
NPM installation.
npm install --save react-native-elements-prompt
Required props:
Optional props:
How to use it in a react-native component:
import React from 'react';
import { View } from 'react-native';
import { Button } from 'react-native-elements';
import Prompt from 'react-native-elements-prompt';
export default class Component extends React.Component {
state = {
promptValue: '',
showPrompt: false
}
_onPromptSubmit = ( inputValue ) => {
this.setState({
promptValue: inputValue,
showPrompt: false
})
}
_showPrompt = () => {
this.setState({
showPrompt: true
})
}
_hidePrompt = () => {
this.setState({
showPrompt: false
})
}
render() {
return (
<View>
<Prompt
visible={this.state.showPrompt}
animationType='slide'
title={{
text:'Input something',
style: {
color:'grey'
}
}}
input={{
keyboardType:'numeric',
placeholder:'some text',
maxLength: 5,
style: {
fontSize: 48
}
}}
submitButton={{
text:'OK',
color:'orange'
}}
cancelButton={{
text:'Cancel'
color:'red'
}}
onSubmit={ this._onPromptSubmit }
onCancel={ this._hidePrompt }
/>
<Button
title='Show Prompt'
onPress={ this._showPrompt }
/>
</View>
)
}
}
FAQs
Prompt input component for react elements.
The npm package react-native-elements-prompt receives a total of 7 weekly downloads. As such, react-native-elements-prompt popularity was classified as not popular.
We found that react-native-elements-prompt 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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.