File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * typescript definition
3+ * @author wallel
4+ */
5+ declare module "react-native-root-toast" {
6+ import * as React from 'react' ;
7+ import * as ReactNative from "react-native" ;
8+ import { TextStyle , StyleProp , ViewStyle } from "react-native" ;
9+ export interface ToastOptions {
10+ containerStyle ?:StyleProp < ViewStyle >
11+ duration ?:number
12+ visible ?: boolean ,
13+ position ?: number ,
14+ animation ?:boolean ,
15+ shadow ?: boolean ,
16+ backgroundColor ?: string ,
17+ opacity ?: number ,
18+ shadowColor ?: string ,
19+ textColor ?: string ,
20+ textStyle ?: StyleProp < TextStyle > ,
21+ delay ?: number ,
22+ hideOnPress ?: boolean ,
23+ onHide ?: Function ,
24+ onHidden ?: Function ,
25+ onShow ?: Function ,
26+ onShown ?: Function
27+ }
28+
29+ export interface ToastProps extends ToastOptions , ReactNative . ViewProperties {
30+ }
31+
32+ export interface Durations {
33+ LONG :number ,
34+ SHORT :number
35+ }
36+ export interface Positions {
37+ TOP :number ,
38+ BOTTOM :number ,
39+ CENTER :number ,
40+ }
41+ export default class Toast extends React . Component < ToastProps > {
42+ static show :( message :string , options :ToastOptions ) => any ;
43+ static hide :( toast :any ) => void ;
44+ static durations :Durations ;
45+ static positions :Positions ;
46+ }
47+ }
48+
49+
You can’t perform that action at this time.
0 commit comments