@react-native-segmented-control/segmented-control 2.5.2 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -28,6 +28,7 @@ type Props = $ReadOnly<{|
|
|
|
28
28
|
tabStyle?: ViewStyle,
|
|
29
29
|
appearance?: 'dark' | 'light' | null,
|
|
30
30
|
accessibilityHint?: string,
|
|
31
|
+
testID?: string,
|
|
31
32
|
|}>;
|
|
32
33
|
|
|
33
34
|
function isBase64(str) {
|
|
@@ -47,6 +48,7 @@ export const SegmentedControlTab = ({
|
|
|
47
48
|
appearance,
|
|
48
49
|
tabStyle,
|
|
49
50
|
accessibilityHint,
|
|
51
|
+
testID,
|
|
50
52
|
}: Props): React.Node => {
|
|
51
53
|
const colorSchemeHook = useColorScheme();
|
|
52
54
|
const colorScheme = appearance || colorSchemeHook;
|
|
@@ -93,7 +95,7 @@ export const SegmentedControlTab = ({
|
|
|
93
95
|
accessibilityHint={accessibilityHint}
|
|
94
96
|
accessibilityRole="button"
|
|
95
97
|
accessibilityState={{selected: selected, disabled: !enabled}}>
|
|
96
|
-
<View style={styles.default}>
|
|
98
|
+
<View testID={testID} style={styles.default}>
|
|
97
99
|
{typeof value === 'number' || typeof value === 'object' ? (
|
|
98
100
|
<Image source={value} style={styles.segmentImage} />
|
|
99
101
|
) : isBase64(value) ? (
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-segmented-control/segmented-control",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.4",
|
|
4
4
|
"description": "React Native SegmentedControlIOS library",
|
|
5
5
|
"main": "js/index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"flow-bin": "^0.142.0",
|
|
44
44
|
"husky": "^8.0.1",
|
|
45
45
|
"jest": "^29.2.1",
|
|
46
|
-
"metro-react-native-babel-preset": "0.
|
|
46
|
+
"metro-react-native-babel-preset": "0.77.0",
|
|
47
47
|
"react": "17.0.2",
|
|
48
48
|
"react-dom": "17.0.2",
|
|
49
49
|
"react-native": "0.63.4",
|