@react-native-pure/toast

2.1.0 • Public • Published

toast

A Toast component of pure javascript

Build Status Coverage Status npm version npm license npm download npm download

Install

$ npm install --save @react-native-pure/toast

Simple Usage

import Toast from "@react-native-pure/toast"

Toast.show({
    message:"hello toast!"
});

Toast

ToastOption

  • message any 默认是字符串
  • renderMessage? (message:any,messageStyle:any)=>React.Node 默认只能处理字符串的message
  • position? "top"|"center"|"bottom" 默认是top
  • duration? number 默认是2000
  • styles?
    • message any 消息的样式
    • container any 容器的样式
  • hideOnPress? boolean 点击是否隐藏,默认是true
  • animation? "none"|"fade" 默认是none
  • onShow? Function 有动画的时候才执行
  • onShown? Function 动画执行完或者没有动画时执行
  • onHide? Function 有动画的时候才执行
  • onHidden? Function 动画执行完或者没有动画时执行

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.1.01latest

Version History

VersionDownloads (Last 7 Days)Published
2.1.01
2.0.00
1.0.00

Package Sidebar

Install

npm i @react-native-pure/toast

Weekly Downloads

1

Version

2.1.0

License

MIT

Unpacked Size

19.4 kB

Total Files

10

Last publish

Collaborators

  • kunkunbobo
  • m860