1.0.0 • Published 6 years ago

nanokit-toast v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

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!

  1. Fork it.
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Or open up a issue.

License

Licensed under the MIT License.