-
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathtypes.ts
More file actions
101 lines (93 loc) · 2.37 KB
/
Copy pathtypes.ts
File metadata and controls
101 lines (93 loc) · 2.37 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import React from "react";
import { ImageStyle, TextStyle, ViewStyle } from "react-native";
export type ThumbChildrenPlacement = "left" | "right";
export interface ThumbChildrenProps {
toggleValue: boolean;
activeColor: string;
inActiveColor: string;
title: string | null;
placement: ThumbChildrenPlacement;
children: any;
disabled: boolean;
disabledTitleStyle: TextStyle | null;
}
export interface TrackBar {
borderWidth?: number;
width?: number;
height?: number;
radius?: number;
activeBackgroundColor?: string;
inActiveBackgroundColor?: string;
borderActiveColor?: string;
borderInActiveColor?: string;
}
export interface ThumbButton {
borderWidth?: number;
width?: number;
height?: number;
radius?: number;
activeBackgroundColor?: string;
inActiveBackgroundColor?: string;
activeColor?: string;
inActiveColor?: string;
}
export interface ReactNativeToggleElementProps {
onPress: (val?: boolean) => void;
value: boolean;
disabled?: boolean;
trackBar?: TrackBar;
thumbButton?: ThumbButton;
leftComponent?: React.ReactNode;
rightComponent?: React.ReactNode;
thumbActiveComponent?: any;
thumbInActiveComponent?: any;
containerStyle?: ViewStyle | null;
trackBarStyle?: ViewStyle | null;
disabledStyle?: ViewStyle;
disabledTitleStyle?: TextStyle;
thumbStyle?: ViewStyle | null;
leftTitle?: string | null;
rightTitle?: string | null;
animationDuration?: number;
activeTrackBarComponent?: React.ReactNode;
inActiveTrackBarComponent?: React.ReactNode;
managed: boolean;
}
export interface Styles {
container: ViewStyle;
trackBar: (trackBar: TrackBar) => ViewStyle | ImageStyle | TextStyle;
}
export interface ToogleTrackBar {
width: number;
height: number;
borderRadius: number;
justifyContent:
| "flex-start"
| "flex-end"
| "center"
| "space-between"
| "space-around"
| "space-evenly"
| undefined;
borderWidth: number;
}
export interface TrackBarConfig {
borderWidth: number;
width: number;
height: number;
radius: number;
activeBackgroundColor: string;
inActiveBackgroundColor: string;
borderActiveColor: string;
borderInActiveColor: string;
}
export interface ThumbButtonConfig {
borderWidth: number;
width: number;
height: number;
radius: number;
activeBackgroundColor: string;
inActiveBackgroundColor: string;
activeColor: string;
inActiveColor: string;
}