1.0.3 • Published 7 years ago

react-native-dj-toast v1.0.3

Weekly downloads
1
License
ISC
Repository
-
Last release
7 years ago

Toast

accordion

Install

npm i --save react-native-dj-toast

Usage

Using in your app will usually look like this:

import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  TouchableHighlight,
} from 'react-native';

import Toast from 'react-native-dj-toast';


export default class NPMTest extends Component {

    render() {
      let icons = [require('./images/success_black.png'), require('./images/error_black.png')];
      return (
        <View style={{marginTop:20}}>
          <TouchableHighlight onPress={()=>this.refs.toast.show('This is a toast!')}>
            <Text>click me</Text>
          </TouchableHighlight>
          <Toast ref="toast" icons={icons}/>
        </View>
      );
    }
}

AppRegistry.registerComponent('xxx', () => NPMTest);

Props

The following props can be used to modify the style and/or behaviour:

PropTypeOpt/RequiredDefaultNote

Methods

The following methods can be used to open and close the Dialog:

MethodParametersNote
showmessage:需要显示的信息,time:toast显示的时长,默认为2000mstime可不传,默认为2000ms
1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago