UNPKG

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