@gisce/react-ooui 1.4.14 → 1.4.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gisce/react-ooui",
3
- "version": "1.4.14",
3
+ "version": "1.4.15",
4
4
  "files": [
5
5
  "dist",
6
6
  "src",
@@ -150,8 +150,7 @@ function getIconForKey(
150
150
  const TablerIcon = () =>
151
151
  React.createElement(TablerIcons[tablerKey] as any, {
152
152
  fill: "transparent",
153
- height: 17,
154
- width: 17,
153
+ size: props?.style?.fontSize || 17
155
154
  });
156
155
  const CustomIcon = () =>
157
156
  React.createElement(Icon, {
@@ -24,6 +24,19 @@ export function Default(): React.ReactElement {
24
24
  // suffix={"€"}
25
25
  />
26
26
  </DashboardGridItem>
27
+ <DashboardGridItem
28
+ title="test"
29
+ parms={{ w: 3, h: 9, x: 0, y: 0, id: 10 }}
30
+ >
31
+ <GraphIndicator
32
+ model="res.partner"
33
+ context={{}}
34
+ domain={{}}
35
+ icon={"bolt"}
36
+ showPercent={true}
37
+ // suffix={"€"}
38
+ />
39
+ </DashboardGridItem>
27
40
  </DashboardGrid>
28
41
  </LocaleProvider>
29
42
  );
@@ -297,7 +297,7 @@ function CommonIndicator({
297
297
  fontSize = maxFontSize;
298
298
  }
299
299
 
300
- const IconElement: any = icon && iconMapper(icon);
300
+ const IconElement: any = icon && iconMapper(icon, {style: {fontSize: fontSize * 0.7}});
301
301
 
302
302
  return (
303
303
  <div
@@ -373,13 +373,13 @@ function PercentageIndicator({
373
373
  tw = tw * 1.5;
374
374
  }
375
375
 
376
- const IconElement: any = icon && iconMapper(icon);
377
-
378
376
  if (tw >= width * 0.85 || fontSize * 2 < twoLinesHeight) {
379
377
  const maxFontSize = ((width * 0.85) / tw) * fontSize;
380
378
  fontSize = maxFontSize;
381
379
  }
382
380
 
381
+ const IconElement: any = icon && iconMapper(icon, {style: {fontSize}});
382
+
383
383
  return (
384
384
  <div
385
385
  ref={measureRef}