forked from santomegonzalo/react-native-floating-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
61 lines (55 loc) · 1.52 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
// Type definitions for react-native-floating-action
declare module "react-native-floating-action" {
import { Component } from "react";
type positionType = "right" | "left" | "center";
type shadowType = {
shadowOpacity?: number;
shadowOffset?: {
width: number;
height: number;
};
shadowColor?: string;
shadowRadius?: number;
};
export class FloatingAction extends Component<IFloatingActionProps> {}
export interface IActionProps {
color?: string;
icon?: JSX.Element;
name: string;
text?: string;
textBackground?: string;
textColor?: string;
textElevation?: number;
margin?: number;
component?: () => void;
render?: () => void;
animated?: boolean;
shadow?: shadowType;
}
export interface IFloatingActionProps {
actions?: IActionProps[];
color?: string;
distanceToEdge?: number | { vertical: number; horizontal: number };
visible?: boolean;
overlayColor?: string;
position?: positionType;
overrideWithAction?: boolean;
floatingIcon?: JSX.Element;
showBackground?: boolean;
openOnMount?: boolean;
actionsPaddingTopBottom?: number;
iconWidth?: number;
iconHeight?: number;
buttonSize?: number;
listenKeyboard?: boolean;
dismissKeyboardOnPress?: boolean;
shadow?: shadowType;
onPressItem?: (name?: string) => void;
onPressMain?: () => void;
onPressBackdrop?: () => void;
onClose?: () => void;
onOpen?: () => void;
onStateChange?: () => void;
animated?: boolean;
}
}