@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 +8 -0
- package/core/DynamicIcon.jsx +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/core/DynamicIcon.jsx
CHANGED
|
@@ -54,7 +54,8 @@ function toIconName(name) {
|
|
|
54
54
|
*/
|
|
55
55
|
export function canResolveIcon(name) {
|
|
56
56
|
const { pascal } = toIconName(name);
|
|
57
|
-
|
|
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
|