@modul-es/icons 0.2.2 → 0.2.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.
Files changed (2) hide show
  1. package/dist/Icon.js +10 -2
  2. package/package.json +1 -1
package/dist/Icon.js CHANGED
@@ -132,8 +132,16 @@ function Icon(_a) {
132
132
  });
133
133
  return svg.trim();
134
134
  }, [svgContent, size, className, set]);
135
- if (error || !processedSvg) {
135
+ var iconSize = typeof size === 'string' && size in SIZE_MAP
136
+ ? SIZE_MAP[size]
137
+ : typeof size === 'number'
138
+ ? size
139
+ : 24;
140
+ if (error) {
136
141
  return null;
137
142
  }
138
- return ((0, jsx_runtime_1.jsx)("div", { dangerouslySetInnerHTML: { __html: processedSvg } }));
143
+ return ((0, jsx_runtime_1.jsx)("span", { style: {
144
+ width: iconSize,
145
+ height: iconSize,
146
+ }, dangerouslySetInnerHTML: processedSvg ? { __html: processedSvg } : undefined }));
139
147
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modul-es/icons",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Icon component system",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",