-
Notifications
You must be signed in to change notification settings - Fork 404
/
Copy pathindex.d.ts
54 lines (51 loc) · 1.43 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**
* typescript definition
* @author wallel
*/
declare module 'react-native-root-toast' {
import * as React from 'react';
import * as ReactNative from 'react-native';
import {TextStyle, StyleProp, ViewStyle, ViewProps} from 'react-native';
export interface ToastOptions {
containerStyle?: StyleProp<ViewStyle>;
duration?: number;
visible?: boolean;
position?: number;
animation?: boolean;
shadow?: boolean;
backgroundColor?: string;
opacity?: number;
shadowColor?: string;
textColor?: string;
textStyle?: StyleProp<TextStyle>;
delay?: number;
keyboardAvoiding?: boolean;
hideOnPress?: boolean;
onHide?: Function;
onHidden?: Function;
onShow?: Function;
onShown?: Function;
onPress?: Function;
accessible?: boolean;
accessibilityLabel?: string;
accessibilityHint?: string;
accessibilityRole?: string;
}
export interface ToastProps extends ToastOptions, ViewProps {}
export interface Durations {
LONG: number;
SHORT: number;
}
export interface Positions {
TOP: number;
BOTTOM: number;
CENTER: number;
}
export default class Toast extends React.Component<ToastProps> {
static show: (message: React.ReactNode, options?: ToastOptions) => any;
static hide: (toast: any) => void;
static durations: Durations;
static positions: Positions;
}
export class ToastContainer extends React.Component<ToastProps> {}
}