@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.cjs.js CHANGED
@@ -6044,6 +6044,9 @@ var displayCurrency = function displayCurrency(cents) {
6044
6044
  var convertCentsToMoneyInt = function convertCentsToMoneyInt(n) {
6045
6045
  return (n / 100).toFixed(0);
6046
6046
  };
6047
+ var formatPercent = function formatPercent(decimal) {
6048
+ return Number.parseFloat(decimal).toFixed(2);
6049
+ };
6047
6050
 
6048
6051
  var createUniqueId = function createUniqueId() {
6049
6052
  return "_" + Math.random().toString(36).substr(2, 9);
@@ -6118,6 +6121,7 @@ var general = /*#__PURE__*/Object.freeze({
6118
6121
  noop: noop,
6119
6122
  displayCurrency: displayCurrency,
6120
6123
  convertCentsToMoneyInt: convertCentsToMoneyInt,
6124
+ formatPercent: formatPercent,
6121
6125
  safeChildren: safeChildren,
6122
6126
  generateClickHandler: generateClickHandler,
6123
6127
  checkCardBrand: checkCardBrand,
@@ -22167,7 +22171,7 @@ var ProcessingFee = function ProcessingFee(_ref) {
22167
22171
  hiddenStyles: hide
22168
22172
  }, /*#__PURE__*/React__default.createElement(Alert$1, {
22169
22173
  heading: "Processing Fee",
22170
- text: "There is a processing fee of ".concat(feeType === "FLAT" ? "".concat(displayCurrency(feeValue)) : "".concat(feeValue * 100, "%"), " ").concat(ifElse(isNil, always(""), function (a) {
22174
+ text: "There is a processing fee of ".concat(feeType === "FLAT" ? "".concat(displayCurrency(feeValue)) : "".concat(formatPercent(feeValue * 100), "%"), " ").concat(ifElse(isNil, always(""), function (a) {
22171
22175
  return "with a minimum of ".concat(displayCurrency(a), " ");
22172
22176
  })(feeMinimum), "on all ").concat(feeName, " payments."),
22173
22177
  variant: "info",