@react-native-segmented-control/segmented-control 2.5.1 → 2.5.2

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.
@@ -93,6 +93,20 @@ const SegmentedControl = ({
93
93
  selectedIndex={selectedIndex}
94
94
  />
95
95
  )}
96
+ {selectedIndex != null && segmentWidth ? (
97
+ <Animated.View
98
+ style={[
99
+ styles.slider,
100
+ {
101
+ transform: [{translateX: animation}],
102
+ width: segmentWidth - 4,
103
+ zIndex: -1,
104
+ backgroundColor:
105
+ tintColor || (colorScheme === 'dark' ? '#636366' : 'white'),
106
+ },
107
+ ]}
108
+ />
109
+ ) : null}
96
110
  <View style={styles.segmentsContainer}>
97
111
  {values &&
98
112
  values.map((value, index) => {
@@ -117,20 +131,6 @@ const SegmentedControl = ({
117
131
  );
118
132
  })}
119
133
  </View>
120
- {selectedIndex != null && segmentWidth ? (
121
- <Animated.View
122
- style={[
123
- styles.slider,
124
- {
125
- transform: [{translateX: animation}],
126
- width: segmentWidth - 4,
127
- zIndex: -1,
128
- backgroundColor:
129
- tintColor || (colorScheme === 'dark' ? '#636366' : 'white'),
130
- },
131
- ]}
132
- />
133
- ) : null}
134
134
  </View>
135
135
  );
136
136
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-segmented-control/segmented-control",
3
- "version": "2.5.1",
3
+ "version": "2.5.2",
4
4
  "description": "React Native SegmentedControlIOS library",
5
5
  "main": "js/index.js",
6
6
  "types": "index.d.ts",