react-native-dropdownalert
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -19,3 +19,3 @@ | ||
return { | ||
closeInterval: -1, | ||
closeInterval: 4000, | ||
backgroundColor: 'steelblue', | ||
@@ -22,0 +22,0 @@ imageUri: '', |
{ | ||
"name": "react-native-dropdownalert", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "A dropdown alert that allows you to display bits of information to your user.", | ||
@@ -18,3 +18,6 @@ "main": "DropdownAlert.js", | ||
"info", | ||
"warning" | ||
"warning", | ||
"react-native", | ||
"react", | ||
"native" | ||
], | ||
@@ -21,0 +24,0 @@ "author": "Brian Sinnicke", |
@@ -9,3 +9,29 @@ ### react-native-dropdownalert | ||
### Usage | ||
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 | ||
@@ -19,40 +45,18 @@ | ||
### Props | ||
| Props name | Type | Description | Platform | Default | ||
| ------------ | ------------- | ------------ |------------ |------------ | | ||
| closeInterval | Number | Dismiss alert at a certain interval | Both | -1 | ||
| closeInterval | Number | Dismiss alert at a certain interval | Both | 4000 | ||
| backgroundColor | String | background color | Both | steelblue | ||
| imageUri | String | source uri for network image | Both | '' | ||
| imageSrc | String | source for local image | Both | '' | ||
| textColor | String | title & message text color | Both | white | ||
| fontFamily | String | font for title & messsage | Both | HelveticaNeue | ||
| textColor | String | color for title and message | Both | white | ||
| fontFamily | String | font for title and messsage | Both | HelveticaNeue | ||
| startDelta | Number | where view animation starts | Both | -100 | ||
| endDelta | Number | where view animation ends | Both | 0 | ||
### Future | ||
* npm module | ||
* ~~demo gif~~ | ||
* ~~fontFamily prop~~ | ||
* usage example | ||
Inspired by: https://github.com/cwRichardKim/RKDropdownAlert | ||
MIT License | ||
### License | ||
Copyright (c) 2016 devBrian | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
[MIT](https://raw.github.com/devBrian/react-native-dropdownalert/master/LICENSE) |
19987
17
61