1.0.0 • Published 6 years ago
nanokit-toast v1.0.0
Install
$ npm install nanokit-toast
# OR
$ yarn add nanokit-toast
Usage
import React from 'react'
import { View } from 'react-native'
import Toast from 'nanokit-toast'
class Example extends React.Component {
componentDidMount() {
setTimeout(() => {
this.refs.toast.show('At top', 2000, 'top')
}, 2000)
setTimeout(() => {
this.refs.toast.show('At center', 3000, 'center')
}, 6000)
setTimeout(() => {
this.refs.toast.show('At bottom', 2000)
}, 8000)
}
render() {
return <View style={styles.container}>
<Toast ref="toast" />
</View>
}
}
Contributing
Contributions are welcome!
- Fork it.
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Or open up a issue.
License
Licensed under the MIT License.
1.0.0
6 years ago