UNPKG

16.6 kBTypeScriptView Raw
1import * as React from 'react';
2import TouchableRipple from '../TouchableRipple/TouchableRipple';
3import type { $RemoveChildren } from '../../types';
4declare type Props = $RemoveChildren<typeof TouchableRipple> & {
5 /**
6 * Status of checkbox.
7 */
8 status: 'checked' | 'unchecked' | 'indeterminate';
9 /**
10 * Whether checkbox is disabled.
11 */
12 disabled?: boolean;
13 /**
14 * Function to execute on press.
15 */
16 onPress?: () => void;
17 /**
18 * Custom color for checkbox.
19 */
20 color?: string;
21 /**
22 * @optional
23 */
24 theme: ReactNativePaper.Theme;
25 /**
26 * testID to be used on tests.
27 */
28 testID?: string;
29};
30declare const _default: React.ComponentType<Pick<$RemoveChildren<React.ComponentType<Pick<import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
31 borderless?: boolean | undefined;
32 background?: Object | undefined;
33 centered?: boolean | undefined; /**
34 * @optional
35 */
36 disabled?: boolean | undefined;
37 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
38 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
39 rippleColor?: string | undefined;
40 underlayColor?: string | undefined;
41 children: React.ReactNode;
42 style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
43 theme: ReactNativePaper.Theme;
44}, keyof import("react-native").TouchableWithoutFeedbackProps | "background" | "borderless" | "rippleColor" | "underlayColor" | "centered" | keyof React.RefAttributes<import("react-native").TouchableWithoutFeedback>> & {
45 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
46}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
47 borderless?: boolean | undefined;
48 background?: Object | undefined;
49 centered?: boolean | undefined; /**
50 * @optional
51 */
52 disabled?: boolean | undefined;
53 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
54 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
55 rippleColor?: string | undefined;
56 underlayColor?: string | undefined;
57 children: React.ReactNode;
58 style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
59 theme: ReactNativePaper.Theme;
60}> & {
61 ({ style, background: _background, borderless, disabled: disabledProp, rippleColor, underlayColor: _underlayColor, children, theme, ...rest }: import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
62 borderless?: boolean | undefined;
63 background?: Object | undefined;
64 centered?: boolean | undefined; /**
65 * @optional
66 */
67 disabled?: boolean | undefined;
68 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
69 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
70 rippleColor?: string | undefined;
71 underlayColor?: string | undefined;
72 children: React.ReactNode;
73 style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
74 theme: ReactNativePaper.Theme;
75 }): JSX.Element;
76 supported: boolean;
77}, {}>> & {
78 /**
79 * Status of checkbox.
80 */
81 status: "checked" | "unchecked" | "indeterminate";
82 /**
83 * Whether checkbox is disabled.
84 */
85 disabled?: boolean | undefined;
86 /**
87 * Function to execute on press.
88 */
89 onPress?: (() => void) | undefined;
90 /**
91 * Custom color for checkbox.
92 */
93 color?: string | undefined;
94 /**
95 * @optional
96 */
97 theme: ReactNativePaper.Theme;
98 /**
99 * testID to be used on tests.
100 */
101 testID?: string | undefined;
102}, "style" | "color" | "onLayout" | "onPress" | "onPressIn" | "onPressOut" | "onLongPress" | "testID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "key" | "hitSlop" | "delayLongPress" | "delayPressIn" | "delayPressOut" | "disabled" | "onBlur" | "onFocus" | "pressRetentionOffset" | "touchSoundDisabled" | "background" | "borderless" | "rippleColor" | "underlayColor" | "centered" | "status"> & {
103 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
104}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<$RemoveChildren<React.ComponentType<Pick<import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
105 borderless?: boolean | undefined;
106 background?: Object | undefined;
107 centered?: boolean | undefined; /**
108 * @optional
109 */
110 disabled?: boolean | undefined;
111 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
112 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
113 rippleColor?: string | undefined;
114 underlayColor?: string | undefined;
115 children: React.ReactNode;
116 style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
117 theme: ReactNativePaper.Theme;
118}, keyof import("react-native").TouchableWithoutFeedbackProps | "background" | "borderless" | "rippleColor" | "underlayColor" | "centered" | keyof React.RefAttributes<import("react-native").TouchableWithoutFeedback>> & {
119 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
120}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
121 borderless?: boolean | undefined;
122 background?: Object | undefined;
123 centered?: boolean | undefined; /**
124 * @optional
125 */
126 disabled?: boolean | undefined;
127 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
128 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
129 rippleColor?: string | undefined;
130 underlayColor?: string | undefined;
131 children: React.ReactNode;
132 style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
133 theme: ReactNativePaper.Theme;
134}> & {
135 ({ style, background: _background, borderless, disabled: disabledProp, rippleColor, underlayColor: _underlayColor, children, theme, ...rest }: import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
136 borderless?: boolean | undefined;
137 background?: Object | undefined;
138 centered?: boolean | undefined; /**
139 * @optional
140 */
141 disabled?: boolean | undefined;
142 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
143 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
144 rippleColor?: string | undefined;
145 underlayColor?: string | undefined;
146 children: React.ReactNode;
147 style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
148 theme: ReactNativePaper.Theme;
149 }): JSX.Element;
150 supported: boolean;
151}, {}>> & {
152 /**
153 * Status of checkbox.
154 */
155 status: "checked" | "unchecked" | "indeterminate";
156 /**
157 * Whether checkbox is disabled.
158 */
159 disabled?: boolean | undefined;
160 /**
161 * Function to execute on press.
162 */
163 onPress?: (() => void) | undefined;
164 /**
165 * Custom color for checkbox.
166 */
167 color?: string | undefined;
168 /**
169 * @optional
170 */
171 theme: ReactNativePaper.Theme;
172 /**
173 * testID to be used on tests.
174 */
175 testID?: string | undefined;
176}> & {
177 ({ status, disabled, onPress, theme, testID, ...rest }: Props): JSX.Element;
178 displayName: string;
179}, {}>;
180export default _default;
181declare const CheckboxIOSWithTheme: React.ComponentType<Pick<$RemoveChildren<React.ComponentType<Pick<import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
182 borderless?: boolean | undefined;
183 background?: Object | undefined;
184 centered?: boolean | undefined; /**
185 * @optional
186 */
187 disabled?: boolean | undefined;
188 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
189 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
190 rippleColor?: string | undefined;
191 underlayColor?: string | undefined;
192 children: React.ReactNode;
193 style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
194 theme: ReactNativePaper.Theme;
195}, keyof import("react-native").TouchableWithoutFeedbackProps | "background" | "borderless" | "rippleColor" | "underlayColor" | "centered" | keyof React.RefAttributes<import("react-native").TouchableWithoutFeedback>> & {
196 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
197}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
198 borderless?: boolean | undefined;
199 background?: Object | undefined;
200 centered?: boolean | undefined; /**
201 * @optional
202 */
203 disabled?: boolean | undefined;
204 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
205 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
206 rippleColor?: string | undefined;
207 underlayColor?: string | undefined;
208 children: React.ReactNode;
209 style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
210 theme: ReactNativePaper.Theme;
211}> & {
212 ({ style, background: _background, borderless, disabled: disabledProp, rippleColor, underlayColor: _underlayColor, children, theme, ...rest }: import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
213 borderless?: boolean | undefined;
214 background?: Object | undefined;
215 centered?: boolean | undefined; /**
216 * @optional
217 */
218 disabled?: boolean | undefined;
219 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
220 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
221 rippleColor?: string | undefined;
222 underlayColor?: string | undefined;
223 children: React.ReactNode;
224 style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
225 theme: ReactNativePaper.Theme;
226 }): JSX.Element;
227 supported: boolean;
228}, {}>> & {
229 /**
230 * Status of checkbox.
231 */
232 status: 'checked' | 'unchecked' | 'indeterminate';
233 /**
234 * Whether checkbox is disabled.
235 */
236 disabled?: boolean | undefined;
237 /**
238 * Function to execute on press.
239 */
240 onPress?: (() => void) | undefined;
241 /**
242 * Custom color for checkbox.
243 */
244 color?: string | undefined;
245 /**
246 * @optional
247 */
248 theme: ReactNativePaper.Theme;
249 /**
250 * testID to be used on tests.
251 */
252 testID?: string | undefined;
253}, "style" | "color" | "onLayout" | "onPress" | "onPressIn" | "onPressOut" | "onLongPress" | "testID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "key" | "hitSlop" | "delayLongPress" | "delayPressIn" | "delayPressOut" | "disabled" | "onBlur" | "onFocus" | "pressRetentionOffset" | "touchSoundDisabled" | "background" | "borderless" | "rippleColor" | "underlayColor" | "centered" | "status"> & {
254 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
255}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<$RemoveChildren<React.ComponentType<Pick<import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
256 borderless?: boolean | undefined;
257 background?: Object | undefined;
258 centered?: boolean | undefined; /**
259 * @optional
260 */
261 disabled?: boolean | undefined;
262 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
263 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
264 rippleColor?: string | undefined;
265 underlayColor?: string | undefined;
266 children: React.ReactNode;
267 style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
268 theme: ReactNativePaper.Theme;
269}, keyof import("react-native").TouchableWithoutFeedbackProps | "background" | "borderless" | "rippleColor" | "underlayColor" | "centered" | keyof React.RefAttributes<import("react-native").TouchableWithoutFeedback>> & {
270 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
271}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
272 borderless?: boolean | undefined;
273 background?: Object | undefined;
274 centered?: boolean | undefined; /**
275 * @optional
276 */
277 disabled?: boolean | undefined;
278 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
279 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
280 rippleColor?: string | undefined;
281 underlayColor?: string | undefined;
282 children: React.ReactNode;
283 style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
284 theme: ReactNativePaper.Theme;
285}> & {
286 ({ style, background: _background, borderless, disabled: disabledProp, rippleColor, underlayColor: _underlayColor, children, theme, ...rest }: import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
287 borderless?: boolean | undefined;
288 background?: Object | undefined;
289 centered?: boolean | undefined; /**
290 * @optional
291 */
292 disabled?: boolean | undefined;
293 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
294 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
295 rippleColor?: string | undefined;
296 underlayColor?: string | undefined;
297 children: React.ReactNode;
298 style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
299 theme: ReactNativePaper.Theme;
300 }): JSX.Element;
301 supported: boolean;
302}, {}>> & {
303 /**
304 * Status of checkbox.
305 */
306 status: 'checked' | 'unchecked' | 'indeterminate';
307 /**
308 * Whether checkbox is disabled.
309 */
310 disabled?: boolean | undefined;
311 /**
312 * Function to execute on press.
313 */
314 onPress?: (() => void) | undefined;
315 /**
316 * Custom color for checkbox.
317 */
318 color?: string | undefined;
319 /**
320 * @optional
321 */
322 theme: ReactNativePaper.Theme;
323 /**
324 * testID to be used on tests.
325 */
326 testID?: string | undefined;
327}> & {
328 ({ status, disabled, onPress, theme, testID, ...rest }: Props): JSX.Element;
329 displayName: string;
330}, {}>;
331export { CheckboxIOSWithTheme as CheckboxIOS };
332
\No newline at end of file