forked from crazycodeboy/react-native-easy-toast
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.d.ts
More file actions
27 lines (26 loc) · 759 Bytes
/
index.d.ts
File metadata and controls
27 lines (26 loc) · 759 Bytes
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
import { Component, ReactNode } from "react";
import { StyleProp, View, Text, TextStyle, ViewStyle } from "react-native";
declare module "react-native-easy-toast" {
export interface DURATION {
LENGTH_SHORT: number;
FOREVER: number;
}
export interface ToastProps {
style?: StyleProp<ViewStyle>;
textStyle?: StyleProp<TextStyle>;
position?: "top" | "center" | "bottom";
positionValue?: number;
fadeInDuration?: number;
fadeOutDuration?: number;
defaultCloseDelay?: number;
opacity?: number;
}
export default class Toast extends Component<ToastProps> {
show: (
text: string | ReactNode,
duration?: number,
callback?: () => void
) => void;
close: (duration?: number) => void;
}
}