0.1.0 • Published 7 years ago

toast-ynqc v0.1.0

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

toast-ynqc

A react native module to show toast, it works on iOS and Android.

NPM

Getting started

$ npm install toast-ynqc --save

Usage

import Toast from 'toast-ynqc';

Toast.info('ynqc');
Toast.info('loading...', 0);
Toast.info('ynqc', 3, () => {});
Toast.info('loading...', 0, () => {}, 1);
Toast.hide();

Methods

info()

static info(message, duration, closeCallback, closeOpacity)

Parameters:

NameTypedefaultrequiredDescription
messagestring-trueToast content
durationnumber3falseDelay time to close, unit is second
closeCallbackfunction-falseA callback function triggered when the toast is closed
closeOpacitynumber0falseOpacity when the toast is closed

notice When duration = 0, onClose is invalid, toast does not disappear; hidden toast needs to be called Toast.hide()

hide()

static hide()   // global destroy method of toast
0.1.0

7 years ago

0.0.66

7 years ago

0.0.65

7 years ago

0.0.64

7 years ago

0.0.63

7 years ago

0.0.62

7 years ago

0.0.61

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago