react-native-dropdownalert
Advanced tools
Comparing version 1.1.0 to 1.2.0
{ | ||
"name": "react-native-dropdownalert", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "A dropdown alert that allows you to display bits of information to your user.", | ||
@@ -5,0 +5,0 @@ "main": "DropdownAlert.js", |
@@ -11,27 +11,27 @@ ### react-native-dropdownalert | ||
import DropdownAlert from 'react-native-dropdownalert' | ||
// ... | ||
constructor(props) { | ||
super(props); | ||
this.showAlert = this.showAlert.bind(this) | ||
} | ||
render() { | ||
return ( | ||
<View> | ||
<DropdownAlert ref={"dropdownalert"} /> | ||
<TouchableHighlight onPress={this.showAlert}> | ||
<Text> | ||
{'Show Alert'} | ||
</Text> | ||
</TouchableHighlight> | ||
</View> | ||
) | ||
} | ||
// ... | ||
showAlert() { | ||
this.refs.dropdownalert.alert('info', 'Info', 'Chicago Cubs won the World Series!') | ||
} | ||
// ... | ||
```javascript | ||
import DropdownAlert from 'react-native-dropdownalert' | ||
// ... | ||
constructor(props) { | ||
super(props); | ||
this.showAlert = this.showAlert.bind(this) | ||
} | ||
render() { | ||
return ( | ||
<View> | ||
<DropdownAlert ref={"dropdownalert"} /> | ||
<TouchableHighlight onPress={this.showAlert}> | ||
<Text> {'Show Alert'} </Text> | ||
</TouchableHighlight> | ||
</View> | ||
) | ||
} | ||
showAlert() { | ||
this.refs.dropdownalert.alert('info', 'Info', 'Chicago Cubs won the World Series!') | ||
} | ||
// ... | ||
``` | ||
### Types | ||
@@ -57,3 +57,3 @@ | ||
Inspired by: https://github.com/cwRichardKim/RKDropdownAlert | ||
Inspired by: [RKDropdownAlert](https://github.com/cwRichardKim/RKDropdownAlert) | ||
@@ -60,0 +60,0 @@ ### License |
19964