|
1 | 1 | import { FontAwesome } from '@expo/vector-icons'; |
| 2 | +import { LinearGradient } from 'expo-linear-gradient'; |
2 | 3 | import { useCallback } from 'react'; |
3 | 4 | import { StyleSheet, Text, View } from 'react-native'; |
4 | 5 | import Animated, { |
@@ -68,18 +69,42 @@ export const TimeRange: React.FC<TimeRangeProps> = ({ |
68 | 69 | <View style={styles.arrowWrapper}> |
69 | 70 | <FontAwesome name="chevron-up" size={ArrowIconSize} color="#ffffff" /> |
70 | 71 | </View> |
71 | | - <Animated.FlatList |
72 | | - onScroll={onScroll} |
73 | | - decelerationRate="fast" |
74 | | - snapToAlignment="center" |
75 | | - snapToOffsets={DurationSnapOffsets} |
76 | | - contentContainerStyle={styles.scrollViewContent} |
77 | | - showsVerticalScrollIndicator={false} |
78 | | - style={styles.list} |
79 | | - data={DurationLabels} |
80 | | - renderItem={renderItem} |
81 | | - disableIntervalMomentum |
82 | | - /> |
| 72 | + <View> |
| 73 | + |
| 74 | + <Animated.FlatList |
| 75 | + onScroll={onScroll} |
| 76 | + decelerationRate="fast" |
| 77 | + snapToAlignment="center" |
| 78 | + snapToOffsets={DurationSnapOffsets} |
| 79 | + contentContainerStyle={styles.scrollViewContent} |
| 80 | + showsVerticalScrollIndicator={false} |
| 81 | + style={styles.list} |
| 82 | + data={DurationLabels} |
| 83 | + renderItem={renderItem} |
| 84 | + disableIntervalMomentum |
| 85 | + /> |
| 86 | + <LinearGradient |
| 87 | + colors={['#000000', 'transparent']} |
| 88 | + style={{ |
| 89 | + position: 'absolute', |
| 90 | + top: 0, |
| 91 | + left: 0, |
| 92 | + right: 0, |
| 93 | + height: 16, |
| 94 | + }} |
| 95 | + /> |
| 96 | + <LinearGradient |
| 97 | + colors={['transparent', '#000000']} |
| 98 | + style={{ |
| 99 | + position: 'absolute', |
| 100 | + bottom: 0, |
| 101 | + left: 0, |
| 102 | + right: 0, |
| 103 | + height: 16, |
| 104 | + }} |
| 105 | + /> |
| 106 | + |
| 107 | + </View> |
83 | 108 | <View style={styles.arrowWrapper}> |
84 | 109 | <FontAwesome name="chevron-down" size={ArrowIconSize} color="#ffffff" /> |
85 | 110 | </View> |
|
0 commit comments