react-native-timer-picker 1.2.4 → 1.2.5
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.
|
@@ -177,12 +177,12 @@ var DurationScroll = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
177
177
|
height: styles.pickerItemContainer.height * numberOfItemsToShow,
|
|
178
178
|
overflow: "hidden",
|
|
179
179
|
}}>
|
|
180
|
-
<react_native_1.FlatList ref={flatListRef} data={data} getItemLayout={getItemLayout} initialScrollIndex={initialScrollIndex} windowSize={numberOfItemsToShow} renderItem={renderItem} keyExtractor={KEY_EXTRACTOR} showsVerticalScrollIndicator={false} decelerationRate=
|
|
180
|
+
<react_native_1.FlatList ref={flatListRef} data={data} getItemLayout={getItemLayout} initialScrollIndex={initialScrollIndex} windowSize={numberOfItemsToShow} renderItem={renderItem} keyExtractor={KEY_EXTRACTOR} showsVerticalScrollIndicator={false} decelerationRate={0.9} scrollEventThrottle={16} snapToAlignment="start"
|
|
181
181
|
// used in place of snapToOffset due to bug on Android
|
|
182
182
|
snapToOffsets={__spreadArray([], Array(data.length), true).map(function (_, i) { return i * styles.pickerItemContainer.height; })} viewabilityConfigCallbackPairs={!disableInfiniteScroll
|
|
183
183
|
? viewabilityConfigCallbackPairs === null || viewabilityConfigCallbackPairs === void 0 ? void 0 : viewabilityConfigCallbackPairs.current
|
|
184
184
|
: undefined} onMomentumScrollEnd={onMomentumScrollEnd} testID="duration-scroll-flatlist"/>
|
|
185
|
-
<react_native_1.View style={styles.pickerLabelContainer}>
|
|
185
|
+
<react_native_1.View style={styles.pickerLabelContainer} pointerEvents="none">
|
|
186
186
|
{typeof label === "string" ? (<react_native_1.Text style={styles.pickerLabel}>{label}</react_native_1.Text>) : (label !== null && label !== void 0 ? label : null)}
|
|
187
187
|
</react_native_1.View>
|
|
188
188
|
{LinearGradient ? (<>
|
|
@@ -193,7 +193,7 @@ var DurationScroll = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
193
193
|
.backgroundColor) !== null && _c !== void 0 ? _c : "white",
|
|
194
194
|
opacity: 0,
|
|
195
195
|
}),
|
|
196
|
-
]} start={{ x: 1, y: 0.3 }} end={{ x: 1, y: 1 }} {...pickerGradientOverlayProps} {...topPickerGradientOverlayProps} style={[styles.pickerGradientOverlay, { top: 0 }]}/>
|
|
196
|
+
]} start={{ x: 1, y: 0.3 }} end={{ x: 1, y: 1 }} pointerEvents="none" {...pickerGradientOverlayProps} {...topPickerGradientOverlayProps} style={[styles.pickerGradientOverlay, { top: 0 }]}/>
|
|
197
197
|
<LinearGradient colors={[
|
|
198
198
|
(0, colorToRgba_1.colorToRgba)({
|
|
199
199
|
color: (_d = styles.pickerContainer
|
|
@@ -201,7 +201,7 @@ var DurationScroll = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
201
201
|
opacity: 0,
|
|
202
202
|
}),
|
|
203
203
|
(_e = styles.pickerContainer.backgroundColor) !== null && _e !== void 0 ? _e : "white",
|
|
204
|
-
]} start={{ x: 1, y: 0 }} end={{ x: 1, y: 0.7 }} {...pickerGradientOverlayProps} {...bottomPickerGradientOverlayProps} style={[
|
|
204
|
+
]} start={{ x: 1, y: 0 }} end={{ x: 1, y: 0.7 }} pointerEvents="none" {...pickerGradientOverlayProps} {...bottomPickerGradientOverlayProps} style={[
|
|
205
205
|
styles.pickerGradientOverlay,
|
|
206
206
|
{ bottom: -1 },
|
|
207
207
|
]}/>
|
|
@@ -21,7 +21,7 @@ var LIGHT_MODE_TEXT_COLOR = "#1B1B1B";
|
|
|
21
21
|
var generateStyles = function (customStyles) {
|
|
22
22
|
var _a;
|
|
23
23
|
return react_native_1.StyleSheet.create({
|
|
24
|
-
container: __assign({
|
|
24
|
+
container: __assign({ justifyContent: "center", alignItems: "center" }, customStyles === null || customStyles === void 0 ? void 0 : customStyles.container),
|
|
25
25
|
contentContainer: __assign({ backgroundColor: ((_a = customStyles === null || customStyles === void 0 ? void 0 : customStyles.backgroundColor) !== null && _a !== void 0 ? _a : (customStyles === null || customStyles === void 0 ? void 0 : customStyles.theme) === "dark")
|
|
26
26
|
? DARK_MODE_BACKGROUND_COLOR
|
|
27
27
|
: LIGHT_MODE_BACKGROUND_COLOR, justifyContent: "center", alignItems: "center", borderRadius: 20, padding: 20 }, customStyles === null || customStyles === void 0 ? void 0 : customStyles.contentContainer),
|