@trafilea/afrodita-components 6.43.9 → 6.43.10
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/build/index.d.ts +2 -1
- package/build/index.esm.js +12 -4
- package/build/index.esm.js.map +1 -1
- package/build/index.js +12 -4
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -6556,16 +6556,24 @@ var TextContainer$1 = newStyled.div(templateObject_2$1j || (templateObject_2$1j
|
|
|
6556
6556
|
var IconWrapper$1 = newStyled.div(templateObject_3$11 || (templateObject_3$11 = __makeTemplateObject(["\n display: inline;\n top: -1px;\n position: relative;\n\n svg {\n vertical-align: -webkit-baseline-middle;\n }\n"], ["\n display: inline;\n top: -1px;\n position: relative;\n\n svg {\n vertical-align: -webkit-baseline-middle;\n }\n"])));
|
|
6557
6557
|
var BuyNowPayLater = function (_a) {
|
|
6558
6558
|
var _b;
|
|
6559
|
-
var displayBNPL = _a.displayBNPL, installments = _a.installments, installmentPrice = _a.installmentPrice, _c = _a.iconFolder, iconFolder = _c === void 0 ? 'PDP' : _c, iconName = _a.iconName, _d = _a.showLogo, showLogo = _d === void 0 ? true : _d, _e = _a.iconColor, iconColor = _e === void 0 ? '#292929' : _e, fontSize = _a.fontSize, _f = _a.bnplWithAfterPay, bnplWithAfterPay = _f === void 0 ? false : _f;
|
|
6559
|
+
var displayBNPL = _a.displayBNPL, installments = _a.installments, installmentPrice = _a.installmentPrice, _c = _a.iconFolder, iconFolder = _c === void 0 ? 'PDP' : _c, iconName = _a.iconName, _d = _a.showLogo, showLogo = _d === void 0 ? true : _d, _e = _a.iconColor, iconColor = _e === void 0 ? '#292929' : _e, fontSize = _a.fontSize, _f = _a.bnplWithAfterPay, bnplWithAfterPay = _f === void 0 ? false : _f, textTemplate = _a.textTemplate;
|
|
6560
6560
|
// @ts-ignore
|
|
6561
6561
|
var IconComponent = (_b = Icon === null || Icon === void 0 ? void 0 : Icon[iconFolder]) === null || _b === void 0 ? void 0 : _b[iconName];
|
|
6562
6562
|
if (!IconComponent) {
|
|
6563
6563
|
console.error('Icon', iconName, 'not found');
|
|
6564
6564
|
return null;
|
|
6565
6565
|
}
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6566
|
+
var dynamicText = '';
|
|
6567
|
+
if (textTemplate) {
|
|
6568
|
+
dynamicText = "".concat(textTemplate.replace('{installments}', installments.toString()).trimEnd(), " ");
|
|
6569
|
+
}
|
|
6570
|
+
else if (!bnplWithAfterPay) {
|
|
6571
|
+
dynamicText = "Or ".concat(installments, " payments of ");
|
|
6572
|
+
}
|
|
6573
|
+
else {
|
|
6574
|
+
dynamicText = "or 4 interest-free payments of ";
|
|
6575
|
+
}
|
|
6576
|
+
return (jsxRuntime.jsx(Container$19, __assign$1({ displayBNPL: displayBNPL }, { children: jsxRuntime.jsxs(TextContainer$1, __assign$1({ style: { fontSize: fontSize }, "data-testid": "mainText" }, { children: [jsxRuntime.jsxs("div", { children: [dynamicText, jsxRuntime.jsx(Text$7, __assign$1({ variant: "body", weight: "bold", style: {
|
|
6569
6577
|
display: 'inline',
|
|
6570
6578
|
fontSize: fontSize,
|
|
6571
6579
|
paddingLeft: '0.25rem',
|