Skip to content

Commit f3ce24c

Browse files
authored
fix: progress bar hit slop for better touch (#2927)
* fix: progress bar hit slop for better touch * fix: progress bar hit slop for better touch
1 parent fd1ccd5 commit f3ce24c

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

package/src/components/ProgressControl/ProgressControl.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ const ProgressControlThumb = () => {
5656
} = useTheme();
5757
return (
5858
<View
59+
hitSlop={{ bottom: 20, left: 20, right: 20, top: 20 }}
5960
style={[
6061
styles.progressControlThumbStyle,
6162
{ backgroundColor: static_white, borderColor: grey_dark, shadowColor: black },

package/src/components/ProgressControl/WaveProgressBar.tsx

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useCallback, useEffect, useMemo, useState } from 'react';
2-
import { Platform, Pressable, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
2+
import { Platform, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
33
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
44
import Animated, { runOnJS, useAnimatedStyle, useSharedValue } from 'react-native-reanimated';
55

@@ -53,19 +53,18 @@ const ProgressControlThumb = ({ style }: { style?: StyleProp<ViewStyle> }) => {
5353
},
5454
} = useTheme();
5555
return (
56-
<Pressable style={{ height: 40, justifyContent: 'center', width: 40 }}>
57-
<View
58-
style={[
59-
styles.progressControlThumbStyle,
60-
{
61-
backgroundColor: static_white,
62-
borderColor: grey_dark,
63-
shadowColor: black,
64-
},
65-
style,
66-
]}
67-
/>
68-
</Pressable>
56+
<View
57+
hitSlop={{ bottom: 20, left: 20, right: 20, top: 20 }}
58+
style={[
59+
styles.progressControlThumbStyle,
60+
{
61+
backgroundColor: static_white,
62+
borderColor: grey_dark,
63+
shadowColor: black,
64+
},
65+
style,
66+
]}
67+
/>
6968
);
7069
};
7170

0 commit comments

Comments
 (0)