UNPKG

2.87 kBTypeScriptView Raw
1import * as React from 'react';
2import { StyleProp, ViewStyle, TextStyle } from 'react-native';
3export declare type Props = {
4 /**
5 * Value of the radio button.
6 */
7 value: string;
8 /**
9 * Label to be displayed on the item.
10 */
11 label: string;
12 /**
13 * Whether radio is disabled.
14 */
15 disabled?: boolean;
16 /**
17 * Function to execute on press.
18 */
19 onPress?: () => void;
20 /**
21 * Accessibility label for the touchable. This is read by the screen reader when the user taps the touchable.
22 */
23 accessibilityLabel?: string;
24 /**
25 * Custom color for unchecked radio.
26 */
27 uncheckedColor?: string;
28 /**
29 * Custom color for radio.
30 */
31 color?: string;
32 /**
33 * Status of radio button.
34 */
35 status?: 'checked' | 'unchecked';
36 /**
37 * Additional styles for container View.
38 */
39 style?: StyleProp<ViewStyle>;
40 /**
41 * Style that is passed to Label element.
42 */
43 labelStyle?: StyleProp<TextStyle>;
44 /**
45 * @optional
46 */
47 theme: ReactNativePaper.Theme;
48 /**
49 * testID to be used on tests.
50 */
51 testID?: string;
52 /**
53 * Whether `<RadioButton.Android />` or `<RadioButton.IOS />` should be used.
54 * Left undefined `<RadioButton />` will be used.
55 */
56 mode?: 'android' | 'ios';
57 /**
58 * Radio button control position.
59 */
60 position?: 'leading' | 'trailing';
61};
62declare const _default: React.ComponentType<Pick<Props, "label" | "style" | "color" | "onPress" | "testID" | "accessibilityLabel" | "position" | "value" | "mode" | "labelStyle" | "disabled" | "status" | "uncheckedColor"> & {
63 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
64}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<Props> & {
65 ({ value, label, style, labelStyle, onPress, disabled, color, uncheckedColor, status, theme: { colors }, accessibilityLabel, testID, mode, position, }: Props): JSX.Element;
66 displayName: string;
67}, {}>;
68export default _default;
69declare const RadioButtonItemWithTheme: React.ComponentType<Pick<Props, "label" | "style" | "color" | "onPress" | "testID" | "accessibilityLabel" | "position" | "value" | "mode" | "labelStyle" | "disabled" | "status" | "uncheckedColor"> & {
70 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
71}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<Props> & {
72 ({ value, label, style, labelStyle, onPress, disabled, color, uncheckedColor, status, theme: { colors }, accessibilityLabel, testID, mode, position, }: Props): JSX.Element;
73 displayName: string;
74}, {}>;
75export { RadioButtonItemWithTheme as RadioButtonItem };