forked from onemolegames/react-native-toast-native
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
49 lines (41 loc) · 1.18 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
// Type definitions for react-native-toast-native 0.1
// Project: https://github.com/onemolegames/react-native-toast-native/blob/master/README.md
// Definitions by: Michele Bombardi <https://github.com/bm-software>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import { Platform } from 'react-native';
export interface Style {
width?: number;
height?: number;
backgroundColor?: string;
color?: string;
borderWidth?: number;
borderRadius?: number;
// iOS-only
borderColor?: string;
// Android-only
paddingLeft?: number;
paddingRight?: number;
paddingBottom?: number;
paddingTop?: number;
fontSize?: number;
lines?: number;
lineHeight?: number;
xOffset?: number;
yOffset?: number;
letterSpacing?: number;
fontWeight?: string;
}
interface ToastNative {
// Toast duration constants
SHORT: any;
LONG: any;
// Toast gravity constants
TOP: any;
BOTTOM: any;
CENTER: any;
show(message?: string): void;
show(message: string, duration?: any, position?: any, styles?: Style): void;
}
declare const ToastNative: ToastNative;
export default ToastNative;