react-native-sweet-toast

1.0.1 • Public • Published

react-native-sweet-toast

Installation

npm install react-native-sweet-toast --save

Example

import React, {Component} from 'react';
import {TouchableOpacity, Text, View} from 'react-native';
import SweetToast from 'react-native-sweet-toast';
 
export default class MyComponent extends Component {
  render() {
    return (
      <View>
        <TouchableOpacity onPress={() => this.sweetToast.callToast()} >
          <Text>Open Alert</Text>
        </TouchableOpacity>
        <TouchableOpacity onPress={() => this.sweetToast.closeToast()} >
          <Text>Close Alert</Text>
        </TouchableOpacity>
        <SweetToast
          onRef={ref => (this.sweetToast = ref)} 
          position="bottom"
          positionValue={20}
          flash
        /> 
      </View>
    );
  }
}

Package Sidebar

Install

npm i react-native-sweet-toast

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

663 kB

Total Files

7

Last publish

Collaborators

  • ifatihyildirim