@grafana/components 0.0.45 → 0.0.46

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.
@@ -82,6 +82,15 @@ const ICON_SIZES = {
82
82
  xxl: 36,
83
83
  xxxl: 48
84
84
  };
85
+ const ICON_STROKE_WIDTHS = {
86
+ xs: 2.5,
87
+ sm: 2.5,
88
+ md: 2,
89
+ lg: 2,
90
+ xl: 2,
91
+ xxl: 1.5,
92
+ xxxl: 1.5
93
+ };
85
94
 
86
95
  const getStyles$8 = ({
87
96
  strokeWidth,
@@ -99,7 +108,13 @@ const getStyles$8 = ({
99
108
  });
100
109
 
101
110
  const Icon = React.forwardRef(
102
- ({ size = "md", strokeWidth = 2, component: Component, isAriaHidden, title }, forwardedRef) => {
111
+ ({
112
+ size = "md",
113
+ strokeWidth = ICON_STROKE_WIDTHS[size],
114
+ component: Component,
115
+ isAriaHidden,
116
+ title
117
+ }, forwardedRef) => {
103
118
  const hasSolidFill = Object.hasOwn(Component, "fill") ? Component.fill === "solid" : false;
104
119
  const styles = getStyles$8({ strokeWidth, hasSolidFill });
105
120
  const svgProps = {
@@ -27449,6 +27464,7 @@ exports.HousePlug = HousePlug;
27449
27464
  exports.HousePlus = HousePlus;
27450
27465
  exports.HouseWifi = HouseWifi;
27451
27466
  exports.ICON_SIZES = ICON_SIZES;
27467
+ exports.ICON_STROKE_WIDTHS = ICON_STROKE_WIDTHS;
27452
27468
  exports.IceCream = IceCream;
27453
27469
  exports.IceCreamBowl = IceCreamBowl;
27454
27470
  exports.IceCreamCone = IceCreamCone;