@quintype/native-components 2.30.8-beta.0 → 2.30.8-beta.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quintype/native-components",
3
- "version": "2.30.8-beta.0",
3
+ "version": "2.30.8-beta.2",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -9,6 +9,5 @@ export const CloseIcon = (props) => {
9
9
  const color = COLORS.BRAND_BLACK;
10
10
  return <Svg height={24} width={24} {...props}>
11
11
  <Path fill={color} d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" />
12
- <Path d="M0 0h24v24H0z" />
13
12
  </Svg>
14
13
  }
@@ -140,7 +140,7 @@ export const StoryGallery = ({ cdn, card }) => {
140
140
 
141
141
  const style = galleryStyles.fullWidth;
142
142
  return (
143
- <TouchableOpacity style={[galleryStyles.subContainer,{margin:4}]}>
143
+ <TouchableOpacity style={[galleryStyles.subContainer, { margin: 4 }]}>
144
144
  <LightBoxImage
145
145
  onClickHandler={onPressHandler}
146
146
  hero={!!data.metaData['focus-point']}
@@ -204,7 +204,13 @@ export const StoryGallery = ({ cdn, card }) => {
204
204
  keyExtractor={(item) => item.id}
205
205
  horizontal
206
206
  extraData={currentIndex}
207
- onScroll={handleScroll}
207
+ onMomentumScrollEnd={(event) => {
208
+ const index = Math.round(
209
+ event.nativeEvent.contentOffset.x /
210
+ event.nativeEvent.layoutMeasurement.width
211
+ );
212
+ setCurrentTabIndex(index);
213
+ }}
208
214
  initialScrollIndex={index}
209
215
  onScrollToIndexFailed={(info) => {
210
216
  const wait = new Promise((resolve) => setTimeout(resolve, 500));