react-gldn-kit 0.1.128 → 0.1.130
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.
|
@@ -40,17 +40,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
40
40
|
exports.Presets = void 0;
|
|
41
41
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
42
42
|
var classnames_1 = __importDefault(require("classnames"));
|
|
43
|
+
var FireSvg_1 = require("components/ui/Icons/FireSvg");
|
|
43
44
|
var styles = __importStar(require("./Presets.module.css"));
|
|
44
45
|
var Presets = function (props) {
|
|
45
46
|
var presets = props.presets, activeAmount = props.activeAmount, handleSetAmount = props.handleSetAmount;
|
|
46
47
|
var handleApply = function (v) { return function () {
|
|
47
48
|
handleSetAmount("".concat(v));
|
|
48
49
|
}; };
|
|
49
|
-
return ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.wrapperPresets }, { children: presets.map(function (
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
return ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.wrapperPresets }, { children: presets.map(function (_a, inx) {
|
|
51
|
+
var _b;
|
|
52
|
+
var value = _a.value, bonusPercent = _a.bonusPercent;
|
|
53
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.preset, (_b = {},
|
|
54
|
+
_b[styles.active] = +activeAmount === value,
|
|
55
|
+
_b)), onClick: handleApply(value) }, { children: [value, !!bonusPercent && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.promoValuePercent }, { children: [(0, jsx_runtime_1.jsx)(FireSvg_1.FireSvg, {}), (0, jsx_runtime_1.jsxs)("div", { children: ["+", bonusPercent, "%"] })] })))] }), "".concat(value, "_").concat(inx)));
|
|
54
56
|
}) })));
|
|
55
57
|
};
|
|
56
58
|
exports.Presets = Presets;
|