@rahmatsaputra-my-id/react-js-library 0.0.91 → 0.0.92
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/dist/index.es.js +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1068,7 +1068,7 @@ var styles$g = {
|
|
|
1068
1068
|
};
|
|
1069
1069
|
|
|
1070
1070
|
var Button = function (_a) {
|
|
1071
|
-
var _b = _a.backgroundColor, backgroundColor = _b === void 0 ? colors.black : _b, _c = _a.bold, bold = _c === void 0 ? false : _c, _d = _a.borderRadius, borderRadius = _d === void 0 ? 8 : _d, _e = _a.bottom, bottom = _e === void 0 ? 0 : _e, _f = _a.center, center = _f === void 0 ? true : _f, _g = _a.disabled, disabled = _g === void 0 ? false : _g, _h = _a.isLoading, isLoading = _h === void 0 ? false : _h, label = _a.label, _j = _a.left, left = _j === void 0 ? 0 : _j,
|
|
1071
|
+
var _b = _a.backgroundColor, backgroundColor = _b === void 0 ? colors.black : _b, _c = _a.bold, bold = _c === void 0 ? false : _c, _d = _a.borderRadius, borderRadius = _d === void 0 ? 8 : _d, _e = _a.bottom, bottom = _e === void 0 ? 0 : _e, _f = _a.center, center = _f === void 0 ? true : _f, _g = _a.disabled, disabled = _g === void 0 ? false : _g, _h = _a.isLoading, isLoading = _h === void 0 ? false : _h, label = _a.label, _j = _a.left, left = _j === void 0 ? 0 : _j, _k = _a.onPress, onPress = _k === void 0 ? function () { } : _k, _l = _a.padding, padding = _l === void 0 ? 16 : _l, _m = _a.right, right = _m === void 0 ? 0 : _m, _o = _a.size, size = _o === void 0 ? 16 : _o, _p = _a.style, style = _p === void 0 ? {} : _p, _q = _a.top, top = _q === void 0 ? 0 : _q, _r = _a.transparent, transparent = _r === void 0 ? false : _r, _s = _a.outlineColor, outlineColor = _s === void 0 ? false : _s, props = __rest(_a, ["backgroundColor", "bold", "borderRadius", "bottom", "center", "disabled", "isLoading", "label", "left", "onPress", "padding", "right", "size", "style", "top", "transparent", "outlineColor"]);
|
|
1072
1072
|
var isDisabled = disabled || isLoading;
|
|
1073
1073
|
var isOutline = Boolean(outlineColor);
|
|
1074
1074
|
var computedBackgroundColor = (function () {
|
|
@@ -1080,7 +1080,7 @@ var Button = function (_a) {
|
|
|
1080
1080
|
return colors.white;
|
|
1081
1081
|
return backgroundColor;
|
|
1082
1082
|
})();
|
|
1083
|
-
var buttonStyle = __assign(__assign(
|
|
1083
|
+
var buttonStyle = __assign(__assign({ backgroundColor: computedBackgroundColor, border: isOutline ? "1px solid ".concat(outlineColor) : 'none', borderRadius: borderRadius, color: isOutline ? outlineColor : colors.white, fontSize: size, fontWeight: bold ? 'bold' : 'normal', marginTop: top, marginRight: right, marginBottom: bottom, marginLeft: left, outline: !outlineColor && 'none', padding: padding, textAlign: center ? 'center' : 'left' }, style), styles$g.content);
|
|
1084
1084
|
return (jsx("button", __assign({ type: "submit", disabled: isDisabled, onClick: onPress, style: buttonStyle }, props, { children: isLoading ? jsx(LoadingSpinner, { loadingType: 'section-s' }) : label })));
|
|
1085
1085
|
};
|
|
1086
1086
|
|
package/dist/index.js
CHANGED
|
@@ -1077,7 +1077,7 @@ var styles$g = {
|
|
|
1077
1077
|
};
|
|
1078
1078
|
|
|
1079
1079
|
var Button = function (_a) {
|
|
1080
|
-
var _b = _a.backgroundColor, backgroundColor = _b === void 0 ? colors.black : _b, _c = _a.bold, bold = _c === void 0 ? false : _c, _d = _a.borderRadius, borderRadius = _d === void 0 ? 8 : _d, _e = _a.bottom, bottom = _e === void 0 ? 0 : _e, _f = _a.center, center = _f === void 0 ? true : _f, _g = _a.disabled, disabled = _g === void 0 ? false : _g, _h = _a.isLoading, isLoading = _h === void 0 ? false : _h, label = _a.label, _j = _a.left, left = _j === void 0 ? 0 : _j,
|
|
1080
|
+
var _b = _a.backgroundColor, backgroundColor = _b === void 0 ? colors.black : _b, _c = _a.bold, bold = _c === void 0 ? false : _c, _d = _a.borderRadius, borderRadius = _d === void 0 ? 8 : _d, _e = _a.bottom, bottom = _e === void 0 ? 0 : _e, _f = _a.center, center = _f === void 0 ? true : _f, _g = _a.disabled, disabled = _g === void 0 ? false : _g, _h = _a.isLoading, isLoading = _h === void 0 ? false : _h, label = _a.label, _j = _a.left, left = _j === void 0 ? 0 : _j, _k = _a.onPress, onPress = _k === void 0 ? function () { } : _k, _l = _a.padding, padding = _l === void 0 ? 16 : _l, _m = _a.right, right = _m === void 0 ? 0 : _m, _o = _a.size, size = _o === void 0 ? 16 : _o, _p = _a.style, style = _p === void 0 ? {} : _p, _q = _a.top, top = _q === void 0 ? 0 : _q, _r = _a.transparent, transparent = _r === void 0 ? false : _r, _s = _a.outlineColor, outlineColor = _s === void 0 ? false : _s, props = __rest(_a, ["backgroundColor", "bold", "borderRadius", "bottom", "center", "disabled", "isLoading", "label", "left", "onPress", "padding", "right", "size", "style", "top", "transparent", "outlineColor"]);
|
|
1081
1081
|
var isDisabled = disabled || isLoading;
|
|
1082
1082
|
var isOutline = Boolean(outlineColor);
|
|
1083
1083
|
var computedBackgroundColor = (function () {
|
|
@@ -1089,7 +1089,7 @@ var Button = function (_a) {
|
|
|
1089
1089
|
return colors.white;
|
|
1090
1090
|
return backgroundColor;
|
|
1091
1091
|
})();
|
|
1092
|
-
var buttonStyle = __assign(__assign(
|
|
1092
|
+
var buttonStyle = __assign(__assign({ backgroundColor: computedBackgroundColor, border: isOutline ? "1px solid ".concat(outlineColor) : 'none', borderRadius: borderRadius, color: isOutline ? outlineColor : colors.white, fontSize: size, fontWeight: bold ? 'bold' : 'normal', marginTop: top, marginRight: right, marginBottom: bottom, marginLeft: left, outline: !outlineColor && 'none', padding: padding, textAlign: center ? 'center' : 'left' }, style), styles$g.content);
|
|
1093
1093
|
return (jsxRuntime.jsx("button", __assign({ type: "submit", disabled: isDisabled, onClick: onPress, style: buttonStyle }, props, { children: isLoading ? jsxRuntime.jsx(LoadingSpinner, { loadingType: 'section-s' }) : label })));
|
|
1094
1094
|
};
|
|
1095
1095
|
|