-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
67 lines (60 loc) · 1.69 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
55
56
57
58
59
60
61
62
63
64
65
66
67
import React from 'react';
import { ViewStyle, TextStyle, ImageSourcePropType } from 'react-native'
declare module 'react-native-toast-message' {
interface AnyObject {
[key: string]: any;
}
export type ToastPosition = 'top' | 'bottom'
export interface BaseToastProps {
leadingIcon?: ImageSourcePropType,
trailingIcon?: ImageSourcePropType,
text1?: string,
text2?: string,
onPress?: () => void,
onTrailingIconPress?: () => void,
onLeadingIconPress?: () => void,
style?: ViewStyle,
leadingIconContainerStyle?: ViewStyle,
trailingIconContainerStyle?: ViewStyle,
leadingIconStyle?: ViewStyle,
trailingIconStyle?: ViewStyle,
contentContainerStyle?: ViewStyle,
text1Style?: TextStyle,
text2Style?: TextStyle,
activeOpacity?: number,
text1NumberOfLines: number,
text2NumberOfLines: number,
}
export const BaseToast: React.FC<BaseToastProps>
export interface ToastProps {
ref: (ref: any) => any;
config?: AnyObject,
style?: ViewStyle,
topOffset?: number,
bottomOffset?: number,
keyboardOffset?: number,
visibilityTime?: number,
autoHide?: boolean,
height?: number,
position?: ToastPosition,
type?: string
}
export default class Toast extends React.Component<ToastProps> {
static show(options: {
type: string,
position?: ToastPosition,
text1?: string,
text2?: string,
visibilityTime?: number,
autoHide?: boolean,
topOffset?: number,
bottomOffset?: number,
props?: AnyObject,
onShow?: () => void,
onHide?: () => void,
onPress?: () => void
}): void;
static hide(): void;
static setRef(ref: any): any;
}
}