@stevederico/skateboard-ui 2.16.0 → 2.17.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # CHANGELOG
2
2
 
3
+ 2.17.0
4
+
5
+ Fix DynamicIcon forwardRef detection
6
+
7
+ 2.16.0
8
+
9
+ Fix DynamicIcon static imports
10
+
3
11
  2.15.0
4
12
 
5
13
  Add authOverlay 401 retry logic
@@ -54,7 +54,8 @@ function toIconName(name) {
54
54
  */
55
55
  export function canResolveIcon(name) {
56
56
  const { pascal } = toIconName(name);
57
- return pascal in LucideIcons && typeof LucideIcons[pascal] === "function";
57
+ const icon = LucideIcons[pascal];
58
+ return !!icon && (typeof icon === "function" || typeof icon?.render === "function");
58
59
  }
59
60
 
60
61
  /**
@@ -93,7 +94,7 @@ const DynamicIcon = ({
93
94
  const { pascal } = toIconName(name);
94
95
  const Icon = LucideIcons[pascal];
95
96
 
96
- if (!Icon || typeof Icon !== "function") return null;
97
+ if (!Icon || (typeof Icon !== "function" && typeof Icon?.render !== "function")) return null;
97
98
 
98
99
  return (
99
100
  <Icon
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stevederico/skateboard-ui",
3
3
  "private": false,
4
- "version": "2.16.0",
4
+ "version": "2.17.0",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  "./Sidebar": {