0.2.0 • Published 4 years ago

rn-fixed-toast v0.2.0

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

React Native Fixed Toast

Install using npm i rn-fixed-toast --save

Implementation

import showToast from "rn-fixed-toast";

And in component render method ..

render() {
    return (
      <View style={styles.container}>
        <Text style={styles.welcome}>Welcome to React Native!</Text>
        <Text
          onPress={() =>
            
            this.setState({
              toast: showToast("A Toasting for the toast.", 10000)
            });
            
            // You can bind showtoast result to state and toast will appear.
            // The state variable must be rendered in the outer container(Say a View).
            // Params
            //  first:Message for Toast (string)
            //  second:Duration to show toast(number), Optional
          }
          style={styles.instructions}
        >
          Click Me.. !
        </Text>
        {this.state.toast}
        {/*"Don't forget the above line."*/}
      </View>
    );
  }

See example folder for full implementation.

0.2.0

4 years ago

0.1.9

4 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago