🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@react-native-pure/toast

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-native-pure/toast

Toast组件

latest
Source
npmnpm
Version
2.1.0
Version published
Maintainers
2
Created
Source

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

  • show (option:ToastOption)=>void

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 动画执行完或者没有动画时执行

FAQs

Package last updated on 24 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts