react-native-timer-picker 1.1.3 → 1.1.4
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/README.md
CHANGED
|
@@ -326,7 +326,7 @@ The following custom styles can be supplied to re-style the component in any way
|
|
|
326
326
|
| :-------------------: | :------------------------------------- | :-----------------------------------: |
|
|
327
327
|
| theme | Theme of the component | "light" \| "dark" |
|
|
328
328
|
| backgroundColor | Main background color | string |
|
|
329
|
-
|
|
|
329
|
+
| text | Base text style | TextStyle |
|
|
330
330
|
| pickerContainer | Main container for the picker | ViewStyle |
|
|
331
331
|
| pickerLabelContainer | Container for the picker's labels | ViewStyle |
|
|
332
332
|
| pickerLabel | Style for the picker's labels | TextStyle |
|
|
@@ -365,9 +365,9 @@ The following custom styles can be supplied to re-style the component in any way
|
|
|
365
365
|
| container | Main container's style | ViewStyle |
|
|
366
366
|
| contentContainer | Style for the content's container | ViewStyle |
|
|
367
367
|
| buttonContainer | Style for the container around the buttons | ViewStyle |
|
|
368
|
-
| button | General style for both buttons |
|
|
369
|
-
| cancelButton | Style for the cancel button |
|
|
370
|
-
| confirmButton | Style for the confirm button |
|
|
368
|
+
| button | General style for both buttons | TextStyle |
|
|
369
|
+
| cancelButton | Style for the cancel button | TextStyle |
|
|
370
|
+
| confirmButton | Style for the confirm button | TextStyle |
|
|
371
371
|
| modalTitle | Style for the title of the modal | TextStyle |
|
|
372
372
|
|
|
373
373
|
|
|
@@ -19,22 +19,22 @@ var DARK_MODE_TEXT_COLOR = "#E9E9E9";
|
|
|
19
19
|
var LIGHT_MODE_BACKGROUND_COLOR = "#F1F1F1";
|
|
20
20
|
var LIGHT_MODE_TEXT_COLOR = "#1B1B1B";
|
|
21
21
|
var generateStyles = function (customStyles, options) {
|
|
22
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
22
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
23
23
|
return react_native_1.StyleSheet.create({
|
|
24
24
|
pickerContainer: __assign({ flexDirection: "row", marginRight: "8%", 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"
|
|
25
25
|
? DARK_MODE_BACKGROUND_COLOR
|
|
26
26
|
: LIGHT_MODE_BACKGROUND_COLOR) }, customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerContainer),
|
|
27
27
|
pickerLabelContainer: __assign({ position: "absolute", right: 4, top: 0, bottom: 0, justifyContent: "center" }, customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerLabelContainer),
|
|
28
|
-
pickerLabel: __assign({ fontSize: 18, fontWeight: "bold", marginTop: ((_c = (_b = customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerItem) === null || _b === void 0 ? void 0 : _b.fontSize) !== null && _c !== void 0 ? _c : 25) / 6, color: (
|
|
28
|
+
pickerLabel: __assign(__assign({ fontSize: 18, fontWeight: "bold", marginTop: ((_c = (_b = customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerItem) === null || _b === void 0 ? void 0 : _b.fontSize) !== null && _c !== void 0 ? _c : 25) / 6, color: (customStyles === null || customStyles === void 0 ? void 0 : customStyles.theme) === "dark"
|
|
29
29
|
? DARK_MODE_TEXT_COLOR
|
|
30
|
-
: LIGHT_MODE_TEXT_COLOR
|
|
31
|
-
pickerItemContainer: __assign({ height: 50, justifyContent: "center", alignItems: "center", width: ((
|
|
32
|
-
pickerItem: __assign({ textAlignVertical: "center", fontSize: 25, color: (
|
|
30
|
+
: LIGHT_MODE_TEXT_COLOR }, customStyles === null || customStyles === void 0 ? void 0 : customStyles.text), customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerLabel),
|
|
31
|
+
pickerItemContainer: __assign({ height: 50, justifyContent: "center", alignItems: "center", width: ((_e = (_d = customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerItem) === null || _d === void 0 ? void 0 : _d.fontSize) !== null && _e !== void 0 ? _e : 25) * 3.6 }, customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerItemContainer),
|
|
32
|
+
pickerItem: __assign(__assign({ textAlignVertical: "center", fontSize: 25, color: (customStyles === null || customStyles === void 0 ? void 0 : customStyles.theme) === "dark"
|
|
33
33
|
? DARK_MODE_TEXT_COLOR
|
|
34
|
-
: LIGHT_MODE_TEXT_COLOR
|
|
34
|
+
: LIGHT_MODE_TEXT_COLOR }, customStyles === null || customStyles === void 0 ? void 0 : customStyles.text), customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerItem),
|
|
35
35
|
pickerGradientOverlay: __assign({ position: "absolute", left: 0, right: 0, height: options.padWithNItems === 0
|
|
36
36
|
? "30%"
|
|
37
|
-
: ((
|
|
37
|
+
: ((_g = (_f = customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerItemContainer) === null || _f === void 0 ? void 0 : _f.height) !== null && _g !== void 0 ? _g : 50) * 0.8 }, customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerGradientOverlay),
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
40
|
exports.generateStyles = generateStyles;
|
|
@@ -19,23 +19,19 @@ var DARK_MODE_TEXT_COLOR = "#E9E9E9";
|
|
|
19
19
|
var LIGHT_MODE_BACKGROUND_COLOR = "#F1F1F1";
|
|
20
20
|
var LIGHT_MODE_TEXT_COLOR = "#1B1B1B";
|
|
21
21
|
var generateStyles = function (customStyles) {
|
|
22
|
-
var _a
|
|
22
|
+
var _a;
|
|
23
23
|
return react_native_1.StyleSheet.create({
|
|
24
24
|
container: __assign({ flex: 1, 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),
|
|
28
28
|
buttonContainer: __assign({ flexDirection: "row", marginTop: 25 }, customStyles === null || customStyles === void 0 ? void 0 : customStyles.buttonContainer),
|
|
29
|
-
button: __assign({ marginHorizontal: 12, paddingVertical: 10, paddingHorizontal: 20, borderWidth: 1, borderRadius: 10, fontSize: 16, overflow: "hidden" }, customStyles === null || customStyles === void 0 ? void 0 : customStyles.button),
|
|
30
|
-
cancelButton: __assign({ borderColor: "gray", color: (
|
|
29
|
+
button: __assign(__assign({ marginHorizontal: 12, paddingVertical: 10, paddingHorizontal: 20, borderWidth: 1, borderRadius: 10, fontSize: 16, overflow: "hidden" }, customStyles === null || customStyles === void 0 ? void 0 : customStyles.text), customStyles === null || customStyles === void 0 ? void 0 : customStyles.button),
|
|
30
|
+
cancelButton: __assign(__assign({ borderColor: "gray", color: (customStyles === null || customStyles === void 0 ? void 0 : customStyles.theme) === "dark" ? DARK_MODE_TEXT_COLOR : "gray", backgroundColor: (customStyles === null || customStyles === void 0 ? void 0 : customStyles.theme) === "dark" ? "gray" : undefined }, customStyles === null || customStyles === void 0 ? void 0 : customStyles.text), customStyles === null || customStyles === void 0 ? void 0 : customStyles.cancelButton),
|
|
31
|
+
confirmButton: __assign(__assign({ borderColor: "green", color: (customStyles === null || customStyles === void 0 ? void 0 : customStyles.theme) === "dark" ? DARK_MODE_TEXT_COLOR : "green", backgroundColor: (customStyles === null || customStyles === void 0 ? void 0 : customStyles.theme) === "dark" ? "green" : undefined }, customStyles === null || customStyles === void 0 ? void 0 : customStyles.text), customStyles === null || customStyles === void 0 ? void 0 : customStyles.confirmButton),
|
|
32
|
+
modalTitle: __assign(__assign({ fontSize: 24, fontWeight: "bold", marginBottom: 15, color: (customStyles === null || customStyles === void 0 ? void 0 : customStyles.theme) === "dark"
|
|
31
33
|
? DARK_MODE_TEXT_COLOR
|
|
32
|
-
:
|
|
33
|
-
confirmButton: __assign({ borderColor: "green", color: ((_c = customStyles === null || customStyles === void 0 ? void 0 : customStyles.textColor) !== null && _c !== void 0 ? _c : (customStyles === null || customStyles === void 0 ? void 0 : customStyles.theme) === "dark")
|
|
34
|
-
? DARK_MODE_TEXT_COLOR
|
|
35
|
-
: "green", backgroundColor: (customStyles === null || customStyles === void 0 ? void 0 : customStyles.theme) === "dark" ? "green" : undefined }, customStyles === null || customStyles === void 0 ? void 0 : customStyles.confirmButton),
|
|
36
|
-
modalTitle: __assign({ fontSize: 24, fontWeight: "bold", marginBottom: 15, color: ((_d = customStyles === null || customStyles === void 0 ? void 0 : customStyles.textColor) !== null && _d !== void 0 ? _d : (customStyles === null || customStyles === void 0 ? void 0 : customStyles.theme) === "dark")
|
|
37
|
-
? DARK_MODE_TEXT_COLOR
|
|
38
|
-
: LIGHT_MODE_TEXT_COLOR }, customStyles === null || customStyles === void 0 ? void 0 : customStyles.modalTitle),
|
|
34
|
+
: LIGHT_MODE_TEXT_COLOR }, customStyles === null || customStyles === void 0 ? void 0 : customStyles.text), customStyles === null || customStyles === void 0 ? void 0 : customStyles.modalTitle),
|
|
39
35
|
});
|
|
40
36
|
};
|
|
41
37
|
exports.generateStyles = generateStyles;
|