magneto365.ui 2.60.1 → 2.61.0

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.
@@ -1,3 +1,4 @@
1
+ export declare type TComparativeCounterPosition = 'left' | 'center' | 'right';
1
2
  export interface IComparativeCounter {
2
3
  /**
3
4
  * this property sets the current counter value
@@ -7,4 +8,8 @@ export interface IComparativeCounter {
7
8
  * this property sets the max counter value
8
9
  */
9
10
  max: number;
11
+ /**
12
+ * this property changes the text align
13
+ */
14
+ position?: TComparativeCounterPosition;
10
15
  }
package/dist/esm/index.js CHANGED
@@ -4534,11 +4534,11 @@ var styles$1d = {"magneto-ui-comparative-counter":"mg_comparative_counter_magnet
4534
4534
 
4535
4535
  var nf = new Intl.NumberFormat('de-DE');
4536
4536
  var Component$1r = function (_a) {
4537
- var _b = _a.current, current = _b === void 0 ? 0 : _b, _c = _a.max, max = _c === void 0 ? 0 : _c;
4537
+ var _b = _a.current, current = _b === void 0 ? 0 : _b, _c = _a.max, max = _c === void 0 ? 0 : _c, _d = _a.position, position = _d === void 0 ? 'left' : _d;
4538
4538
  var currentHigherMax = useMemo(function () {
4539
4539
  return current > max;
4540
4540
  }, [current, max]);
4541
- return (React.createElement("p", { className: "".concat(styles$1d["".concat(classMUI, "-comparative-counter")], " ").concat(currentHigherMax ? styles$1d['error-label'] : '') },
4541
+ return (React.createElement("p", { style: { textAlign: position }, className: "".concat(styles$1d["".concat(classMUI, "-comparative-counter")], " ").concat(currentHigherMax ? styles$1d['error-label'] : '') },
4542
4542
  nf.format(current),
4543
4543
  React.createElement("span", null,
4544
4544
  " / ",