@thecb/components 5.6.0 → 5.6.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/dist/index.esm.js
CHANGED
|
@@ -6036,6 +6036,9 @@ var displayCurrency = function displayCurrency(cents) {
|
|
|
6036
6036
|
var convertCentsToMoneyInt = function convertCentsToMoneyInt(n) {
|
|
6037
6037
|
return (n / 100).toFixed(0);
|
|
6038
6038
|
};
|
|
6039
|
+
var formatPercent = function formatPercent(decimal) {
|
|
6040
|
+
return Number.parseFloat(decimal).toFixed(2);
|
|
6041
|
+
};
|
|
6039
6042
|
|
|
6040
6043
|
var createUniqueId = function createUniqueId() {
|
|
6041
6044
|
return "_" + Math.random().toString(36).substr(2, 9);
|
|
@@ -6110,6 +6113,7 @@ var general = /*#__PURE__*/Object.freeze({
|
|
|
6110
6113
|
noop: noop,
|
|
6111
6114
|
displayCurrency: displayCurrency,
|
|
6112
6115
|
convertCentsToMoneyInt: convertCentsToMoneyInt,
|
|
6116
|
+
formatPercent: formatPercent,
|
|
6113
6117
|
safeChildren: safeChildren,
|
|
6114
6118
|
generateClickHandler: generateClickHandler,
|
|
6115
6119
|
checkCardBrand: checkCardBrand,
|
|
@@ -22159,7 +22163,7 @@ var ProcessingFee = function ProcessingFee(_ref) {
|
|
|
22159
22163
|
hiddenStyles: hide
|
|
22160
22164
|
}, /*#__PURE__*/React.createElement(Alert$1, {
|
|
22161
22165
|
heading: "Processing Fee",
|
|
22162
|
-
text: "There is a processing fee of ".concat(feeType === "FLAT" ? "".concat(displayCurrency(feeValue)) : "".concat(feeValue * 100, "%"), " ").concat(ifElse(isNil, always(""), function (a) {
|
|
22166
|
+
text: "There is a processing fee of ".concat(feeType === "FLAT" ? "".concat(displayCurrency(feeValue)) : "".concat(formatPercent(feeValue * 100), "%"), " ").concat(ifElse(isNil, always(""), function (a) {
|
|
22163
22167
|
return "with a minimum of ".concat(displayCurrency(a), " ");
|
|
22164
22168
|
})(feeMinimum), "on all ").concat(feeName, " payments."),
|
|
22165
22169
|
variant: "info",
|