1 | import * as React from 'react';
|
2 | import { ColorValue, GestureResponderEvent, PressableAndroidRippleConfig, StyleProp, TextStyle, ViewStyle } from 'react-native';
|
3 | import type { ThemeProp } from 'src/types';
|
4 | import type { IconSource } from '../Icon';
|
5 | export declare type Props = {
|
6 | /**
|
7 | * Whether the segmented button is checked
|
8 | */
|
9 | checked: boolean;
|
10 | /**
|
11 | * Icon to display for the `SegmentedButtonItem`.
|
12 | */
|
13 | icon?: IconSource;
|
14 | /**
|
15 | * @supported Available in v5.x with theme version 3
|
16 | * Custom color for unchecked Text and Icon.
|
17 | */
|
18 | uncheckedColor?: string;
|
19 | /**
|
20 | * @supported Available in v5.x with theme version 3
|
21 | * Custom color for checked Text and Icon.
|
22 | */
|
23 | checkedColor?: string;
|
24 | /**
|
25 | * Color of the ripple effect.
|
26 | */
|
27 | rippleColor?: ColorValue;
|
28 | /**
|
29 | * Whether the button is disabled.
|
30 | */
|
31 | disabled?: boolean;
|
32 | /**
|
33 | * Type of background drawabale to display the feedback (Android).
|
34 | * https://reactnative.dev/docs/pressable#rippleconfig
|
35 | */
|
36 | background?: PressableAndroidRippleConfig;
|
37 | /**
|
38 | * Accessibility label for the `SegmentedButtonItem`. This is read by the screen reader when the user taps the button.
|
39 | */
|
40 | accessibilityLabel?: string;
|
41 | /**
|
42 | * Function to execute on press.
|
43 | */
|
44 | onPress?: (event: GestureResponderEvent) => void;
|
45 | /**
|
46 | * Value of button.
|
47 | */
|
48 | value: string;
|
49 | /**
|
50 | * Label text of the button.
|
51 | */
|
52 | label?: string;
|
53 | /**
|
54 | * Button segment.
|
55 | */
|
56 | segment?: 'first' | 'last';
|
57 | /**
|
58 | * Show optional check icon to indicate selected state
|
59 | */
|
60 | showSelectedCheck?: boolean;
|
61 | /**
|
62 | * Density is applied to the height, to allow usage in denser UIs.
|
63 | */
|
64 | density?: 'regular' | 'small' | 'medium' | 'high';
|
65 | /**
|
66 | * Specifies the largest possible scale a label font can reach.
|
67 | */
|
68 | labelMaxFontSizeMultiplier?: number;
|
69 | style?: StyleProp<ViewStyle>;
|
70 | /**
|
71 | * Style for the button label.
|
72 | */
|
73 | labelStyle?: StyleProp<TextStyle>;
|
74 | /**
|
75 | * testID to be used on tests.
|
76 | */
|
77 | testID?: string;
|
78 | /**
|
79 | * @optional
|
80 | */
|
81 | theme?: ThemeProp;
|
82 | };
|
83 | declare const SegmentedButtonItem: ({ checked, accessibilityLabel, disabled, style, labelStyle, showSelectedCheck, checkedColor, uncheckedColor, rippleColor: customRippleColor, background, icon, testID, label, onPress, segment, density, theme: themeOverrides, labelMaxFontSizeMultiplier, }: Props) => React.JSX.Element;
|
84 | export default SegmentedButtonItem;
|
85 | export { SegmentedButtonItem as SegmentedButton };
|
86 | //# sourceMappingURL=SegmentedButtonItem.d.ts.map |
\ | No newline at end of file |