2.1.0 • Published 6 years ago
@react-native-pure/toast v2.1.0
toast
A Toast component of pure javascript
Install
$ npm install --save @react-native-pure/toastSimple Usage
import Toast from "@react-native-pure/toast"
Toast.show({
message:"hello toast!"
});Toast
show(option:ToastOption)=>void
ToastOption
messageany 默认是字符串renderMessage?(message:any,messageStyle:any)=>React.Node 默认只能处理字符串的messageposition?"top"|"center"|"bottom" 默认是topduration?number 默认是2000styles?messageany 消息的样式containerany 容器的样式
hideOnPress?boolean 点击是否隐藏,默认是trueanimation?"none"|"fade" 默认是noneonShow?Function 有动画的时候才执行onShown?Function 动画执行完或者没有动画时执行onHide?Function 有动画的时候才执行onHidden?Function 动画执行完或者没有动画时执行