@vertz/icons 0.2.20 → 0.2.21

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/dist/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  interface IconProps {
2
2
  size?: number;
3
+ className?: string;
4
+ /** @deprecated Use `className` instead. */
3
5
  class?: string;
4
6
  }
5
7
  declare function AArrowDownIcon(props?: IconProps): HTMLSpanElement;
package/dist/index.js CHANGED
@@ -1,10 +1,11 @@
1
1
  // src/render-icon.ts
2
2
  function renderIcon(svgString, props) {
3
- const { size = 16, class: className } = props ?? {};
3
+ const { size = 16, className, class: classProp } = props ?? {};
4
+ const effectiveClass = className ?? classProp;
4
5
  const span = document.createElement("span");
5
6
  span.style.cssText = `display: inline-flex; align-items: center; width: ${size}px; height: ${size}px; flex-shrink: 0`;
6
- if (className)
7
- span.className = className;
7
+ if (effectiveClass)
8
+ span.className = effectiveClass;
8
9
  span.innerHTML = svgString.replace(/\bwidth="\d+"/, `width="${size}"`).replace(/\bheight="\d+"/, `height="${size}"`);
9
10
  return span;
10
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertz/icons",
3
- "version": "0.2.20",
3
+ "version": "0.2.21",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Tree-shakeable Lucide icon components for Vertz",