ui-beyable 1.0.35-beta.3 → 1.0.35-beta.4

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,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { IKpiList, IKpiItem } from './types';
3
3
  declare function KpiList({ children }: IKpiList): JSX.Element;
4
- declare function KpiItem({ name, value, unit, variation, variationNbDecimal }: IKpiItem): JSX.Element;
4
+ declare function KpiItem({ name, value, unit, variation, variationNbDecimal, size }: IKpiItem): JSX.Element;
5
5
  export { KpiList, KpiItem };
@@ -8,5 +8,6 @@ interface IKpiItem {
8
8
  unit?: string;
9
9
  variation?: number;
10
10
  variationNbDecimal?: number;
11
+ size?: 'm' | 's';
11
12
  }
12
13
  export { IKpiList, IKpiItem };
package/lib/cjs/index.js CHANGED
@@ -3017,8 +3017,16 @@ function KpiList(_a) {
3017
3017
  return (React.createElement("div", { className: styles$6.list }, children));
3018
3018
  }
3019
3019
  function KpiItem(_a) {
3020
- var name = _a.name, value = _a.value, unit = _a.unit, variation = _a.variation, _b = _a.variationNbDecimal, variationNbDecimal = _b === void 0 ? 1 : _b;
3021
- return (React.createElement("div", { className: styles$6.item },
3020
+ var name = _a.name, value = _a.value, unit = _a.unit, variation = _a.variation, _b = _a.variationNbDecimal, variationNbDecimal = _b === void 0 ? 1 : _b, _c = _a.size, size = _c === void 0 ? 'm' : _c;
3021
+ var className = [];
3022
+ var sizeClass = {
3023
+ m: styles$6.item_m,
3024
+ s: styles$6.item_s
3025
+ };
3026
+ if (size in sizeClass) {
3027
+ className.push(sizeClass[size]);
3028
+ }
3029
+ return (React.createElement("div", { className: className.join(' ') },
3022
3030
  React.createElement("div", { className: styles$6.item_title }, name),
3023
3031
  React.createElement("div", { className: styles$6.item_value },
3024
3032
  getFormattedNumber(value),