UNPKG

16.5 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?: () => void;
21 /**
22 * Custom color for radio.
23 */
24 color?: string;
25 /**
26 * @optional
27 */
28 theme: ReactNativePaper.Theme;
29 /**
30 * testID to be used on tests.
31 */
32 testID?: string;
33};
34declare const _default: React.ComponentType<Pick<$RemoveChildren<React.ComponentType<Pick<import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
35 borderless?: boolean | undefined;
36 background?: Object | undefined;
37 centered?: boolean | undefined;
38 disabled?: boolean | undefined;
39 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
40 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
41 rippleColor?: string | undefined;
42 underlayColor?: string | undefined;
43 children: React.ReactNode;
44 style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
45 theme: ReactNativePaper.Theme;
46}, keyof import("react-native").TouchableWithoutFeedbackProps | "background" | "borderless" | "rippleColor" | "underlayColor" | "centered" | keyof React.RefAttributes<import("react-native").TouchableWithoutFeedback>> & {
47 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
48}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
49 borderless?: boolean | undefined;
50 background?: Object | undefined;
51 centered?: boolean | undefined;
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 disabled?: boolean | undefined;
66 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
67 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
68 rippleColor?: string | undefined;
69 underlayColor?: string | undefined;
70 children: React.ReactNode;
71 style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
72 theme: ReactNativePaper.Theme;
73 }): JSX.Element;
74 supported: boolean;
75}, {}>> & {
76 /**
77 * Value of the radio button
78 */
79 value: string;
80 /**
81 * Status of radio button.
82 */
83 status?: "checked" | "unchecked" | undefined;
84 /**
85 * Whether radio is disabled.
86 */
87 disabled?: boolean | undefined;
88 /**
89 * Function to execute on press.
90 */
91 onPress?: (() => void) | undefined;
92 /**
93 * Custom color for radio.
94 */
95 color?: string | undefined;
96 /**
97 * @optional
98 */
99 theme: ReactNativePaper.Theme;
100 /**
101 * testID to be used on tests.
102 */
103 testID?: string | undefined;
104}, "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"> & {
105 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
106}> & 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> & {
107 borderless?: boolean | undefined;
108 background?: Object | undefined;
109 centered?: boolean | undefined;
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 disabled?: boolean | undefined;
125 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
126 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
127 rippleColor?: string | undefined;
128 underlayColor?: string | undefined;
129 children: React.ReactNode;
130 style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
131 theme: ReactNativePaper.Theme;
132}> & {
133 ({ style, background: _background, borderless, disabled: disabledProp, rippleColor, underlayColor: _underlayColor, children, theme, ...rest }: import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
134 borderless?: boolean | undefined;
135 background?: Object | undefined;
136 centered?: boolean | undefined;
137 disabled?: boolean | undefined;
138 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
139 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
140 rippleColor?: string | undefined;
141 underlayColor?: string | undefined;
142 children: React.ReactNode;
143 style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
144 theme: ReactNativePaper.Theme;
145 }): JSX.Element;
146 supported: boolean;
147}, {}>> & {
148 /**
149 * Value of the radio button
150 */
151 value: string;
152 /**
153 * Status of radio button.
154 */
155 status?: "checked" | "unchecked" | undefined;
156 /**
157 * Whether radio is disabled.
158 */
159 disabled?: boolean | undefined;
160 /**
161 * Function to execute on press.
162 */
163 onPress?: (() => void) | undefined;
164 /**
165 * Custom color for radio.
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 ({ disabled, onPress, theme, status, value, testID, ...rest }: Props): JSX.Element;
178 displayName: string;
179}, {}>;
180export default _default;
181declare const RadioButtonIOSWithTheme: 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 disabled?: boolean | undefined;
186 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
187 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
188 rippleColor?: string | undefined;
189 underlayColor?: string | undefined;
190 children: React.ReactNode;
191 style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
192 theme: ReactNativePaper.Theme;
193}, keyof import("react-native").TouchableWithoutFeedbackProps | "background" | "borderless" | "rippleColor" | "underlayColor" | "centered" | keyof React.RefAttributes<import("react-native").TouchableWithoutFeedback>> & {
194 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
195}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
196 borderless?: boolean | undefined;
197 background?: Object | undefined;
198 centered?: boolean | undefined;
199 disabled?: boolean | undefined;
200 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
201 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
202 rippleColor?: string | undefined;
203 underlayColor?: string | undefined;
204 children: React.ReactNode;
205 style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
206 theme: ReactNativePaper.Theme;
207}> & {
208 ({ style, background: _background, borderless, disabled: disabledProp, rippleColor, underlayColor: _underlayColor, children, theme, ...rest }: import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
209 borderless?: boolean | undefined;
210 background?: Object | undefined;
211 centered?: boolean | undefined;
212 disabled?: boolean | undefined;
213 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
214 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
215 rippleColor?: string | undefined;
216 underlayColor?: string | undefined;
217 children: React.ReactNode;
218 style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
219 theme: ReactNativePaper.Theme;
220 }): JSX.Element;
221 supported: boolean;
222}, {}>> & {
223 /**
224 * Value of the radio button
225 */
226 value: string;
227 /**
228 * Status of radio button.
229 */
230 status?: "checked" | "unchecked" | undefined;
231 /**
232 * Whether radio is disabled.
233 */
234 disabled?: boolean | undefined;
235 /**
236 * Function to execute on press.
237 */
238 onPress?: (() => void) | undefined;
239 /**
240 * Custom color for radio.
241 */
242 color?: string | undefined;
243 /**
244 * @optional
245 */
246 theme: ReactNativePaper.Theme;
247 /**
248 * testID to be used on tests.
249 */
250 testID?: string | undefined;
251}, "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"> & {
252 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
253}> & 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> & {
254 borderless?: boolean | undefined;
255 background?: Object | undefined;
256 centered?: boolean | undefined;
257 disabled?: boolean | undefined;
258 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
259 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
260 rippleColor?: string | undefined;
261 underlayColor?: string | undefined;
262 children: React.ReactNode;
263 style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
264 theme: ReactNativePaper.Theme;
265}, keyof import("react-native").TouchableWithoutFeedbackProps | "background" | "borderless" | "rippleColor" | "underlayColor" | "centered" | keyof React.RefAttributes<import("react-native").TouchableWithoutFeedback>> & {
266 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
267}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
268 borderless?: boolean | undefined;
269 background?: Object | undefined;
270 centered?: boolean | undefined;
271 disabled?: boolean | undefined;
272 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
273 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
274 rippleColor?: string | undefined;
275 underlayColor?: string | undefined;
276 children: React.ReactNode;
277 style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
278 theme: ReactNativePaper.Theme;
279}> & {
280 ({ style, background: _background, borderless, disabled: disabledProp, rippleColor, underlayColor: _underlayColor, children, theme, ...rest }: import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
281 borderless?: boolean | undefined;
282 background?: Object | undefined;
283 centered?: boolean | undefined;
284 disabled?: boolean | undefined;
285 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
286 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
287 rippleColor?: string | undefined;
288 underlayColor?: string | undefined;
289 children: React.ReactNode;
290 style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
291 theme: ReactNativePaper.Theme;
292 }): JSX.Element;
293 supported: boolean;
294}, {}>> & {
295 /**
296 * Value of the radio button
297 */
298 value: string;
299 /**
300 * Status of radio button.
301 */
302 status?: "checked" | "unchecked" | undefined;
303 /**
304 * Whether radio is disabled.
305 */
306 disabled?: boolean | undefined;
307 /**
308 * Function to execute on press.
309 */
310 onPress?: (() => void) | undefined;
311 /**
312 * Custom color for radio.
313 */
314 color?: string | undefined;
315 /**
316 * @optional
317 */
318 theme: ReactNativePaper.Theme;
319 /**
320 * testID to be used on tests.
321 */
322 testID?: string | undefined;
323}> & {
324 ({ disabled, onPress, theme, status, value, testID, ...rest }: Props): JSX.Element;
325 displayName: string;
326}, {}>;
327export { RadioButtonIOSWithTheme as RadioButtonIOS };
328
\No newline at end of file