-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.d.ts
66 lines (62 loc) · 1.41 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
// Type definitions for @rimiti/react-native-toastify v1.0.0
// Project: @rimiti/react-native-toastify
// Definitions by: Jules Samuel Randolph <https://github.com/jsamr>
// Dimitri DO BAIRRO <https://github.com/rimiti>
import { Component } from 'react'
import { ViewProps, StyleProp, TextProps } from 'react-native'
export interface ToastProps {
/**
* Style definitions for the global element.
*/
style?: StyleProp<ViewProps>
/**
* Toast position.
*/
position?: 'top' | 'center' | 'bottom'
/**
* Style definitions for the toast text element.
*/
textStyle?: StyleProp<TextProps>
/**
* Position value of toast.
* An offset used with top and bottom positions.
*/
positionValue?: number
/**
* Duration of fade in.
*/
fadeInDuration?: number
/**
* Duration of fade out.
*/
fadeOutDuration?: number
/**
* Opacity value.
*/
opacity?: number
/**
* Default duration.
*/
durationShort?: number
/**
* Close delay duration.
*/
defaultCloseDelay?: number
/**
* End value of animation.
*/
end?: number
}
declare class Toast extends Component<ToastProps> {
public show(text: string, duration?: number): void
/**
*
* @param delay The delay after which the toast shall be closed.
*/
public close(delay: number): void
/**
* @returns The position from top edge.
*/
public position(): number
}
export default Toast