@trafilea/afrodita-components 6.47.0 → 6.47.1
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 +6 -2
- package/build/index.esm.js +9 -2
- package/build/index.esm.js.map +1 -1
- package/build/index.js +9 -2
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -2503,7 +2503,9 @@ declare type CTAProps = {
|
|
|
2503
2503
|
disabled?: boolean;
|
|
2504
2504
|
wide?: boolean | false;
|
|
2505
2505
|
size?: ComponentSize;
|
|
2506
|
-
text: string
|
|
2506
|
+
text: string | React.ReactNode | {
|
|
2507
|
+
__html: string;
|
|
2508
|
+
};
|
|
2507
2509
|
type?: ButtonType;
|
|
2508
2510
|
className?: string;
|
|
2509
2511
|
testId?: string;
|
|
@@ -3121,7 +3123,9 @@ interface BaseCTAProps {
|
|
|
3121
3123
|
wide?: boolean;
|
|
3122
3124
|
className?: string;
|
|
3123
3125
|
size?: ComponentSize;
|
|
3124
|
-
text: string
|
|
3126
|
+
text: string | React.ReactNode | {
|
|
3127
|
+
__html: string;
|
|
3128
|
+
};
|
|
3125
3129
|
type?: ButtonType;
|
|
3126
3130
|
inline?: boolean;
|
|
3127
3131
|
testId?: string;
|
package/build/index.esm.js
CHANGED
|
@@ -20299,11 +20299,18 @@ var Benefits$1 = newStyled.div(templateObject_8$7 || (templateObject_8$7 = __mak
|
|
|
20299
20299
|
});
|
|
20300
20300
|
var templateObject_1$q, templateObject_2$j, templateObject_3$i, templateObject_4$f, templateObject_5$e, templateObject_6$b, templateObject_7$a, templateObject_8$7;
|
|
20301
20301
|
|
|
20302
|
+
var renderCopy = function (copy) {
|
|
20303
|
+
if (typeof copy === 'string') {
|
|
20304
|
+
return jsx$1("div", { dangerouslySetInnerHTML: { __html: copy } }, void 0);
|
|
20305
|
+
}
|
|
20306
|
+
return copy;
|
|
20307
|
+
};
|
|
20302
20308
|
var AutoshipPdpCard = function (_a) {
|
|
20309
|
+
var _b, _c;
|
|
20303
20310
|
var handleWithoutSavings = _a.handleWithoutSavings, handleSavings = _a.handleSavings, title = _a.title, ctaText = _a.ctaText, ctaTextNoSavings = _a.ctaTextNoSavings, className = _a.className, benefits = _a.benefits, bottomCopy = _a.bottomCopy;
|
|
20304
|
-
return (jsxs$1(Container$k, __assign$1({ className: className }, { children: [jsxs$1(SubscriptionContainer$2, __assign$1({ "data-testid": "subscription-container" }, { children: [jsxs$1(SubscriptionHeader$2, { children: [jsx$1(Text$7, { variant: "label", dangerouslySetInnerHTML: { __html: title !== null && title !== void 0 ? title : '' } }, void 0), jsx$1(ButtonPrimary, { wide: true, text: ctaText !== null &&
|
|
20311
|
+
return (jsxs$1(Container$k, __assign$1({ className: className }, { children: [jsxs$1(SubscriptionContainer$2, __assign$1({ "data-testid": "subscription-container" }, { children: [jsxs$1(SubscriptionHeader$2, { children: [jsx$1(Text$7, { variant: "label", dangerouslySetInnerHTML: { __html: title !== null && title !== void 0 ? title : '' } }, void 0), jsx$1(ButtonPrimary, { wide: true, text: (_b = renderCopy(ctaText)) !== null && _b !== void 0 ? _b : 'Yes, I want this offer', size: ComponentSize.Small, onClick: function () {
|
|
20305
20312
|
handleSavings();
|
|
20306
|
-
} }, void 0)] }, void 0), jsxs$1(Benefits$1, __assign$1({ "data-testid": "benefits-component" }, { children: [jsx$1(OfferAtCartBenefits, { benefits: benefits }, void 0), bottomCopy && jsx$1(Text$7, { variant: "label", dangerouslySetInnerHTML: { __html: bottomCopy } }, void 0)] }), void 0)] }), void 0), jsx$1(ButtonSecondary, { wide: true, text: ctaTextNoSavings !== null &&
|
|
20313
|
+
} }, void 0)] }, void 0), jsxs$1(Benefits$1, __assign$1({ "data-testid": "benefits-component" }, { children: [jsx$1(OfferAtCartBenefits, { benefits: benefits }, void 0), bottomCopy && jsx$1(Text$7, { variant: "label", dangerouslySetInnerHTML: { __html: bottomCopy } }, void 0)] }), void 0)] }), void 0), jsx$1(ButtonSecondary, { wide: true, text: (_c = renderCopy(ctaTextNoSavings)) !== null && _c !== void 0 ? _c : 'Continue without more savings - ', size: ComponentSize.Small, onClick: function () {
|
|
20307
20314
|
handleWithoutSavings();
|
|
20308
20315
|
} }, void 0)] }), void 0));
|
|
20309
20316
|
};
|