Rebuild all components
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 4s
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 4s
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
// components/Icon.js
|
||||
import { Tag } from "sigpro";
|
||||
|
||||
export const Icon = (iconClass) => {
|
||||
if (!iconClass) return null;
|
||||
return Tag("span", { class: iconClass });
|
||||
};
|
||||
export const Icon = (props, children) => {
|
||||
if (typeof props === "string") {
|
||||
if (props.includes("icon-") || props.startsWith("lucide-")) {
|
||||
return Tag("span", { class: props }, children);
|
||||
}
|
||||
return Tag("span", { class: "icon" }, props);
|
||||
}
|
||||
if (!props) return null;
|
||||
const { class: className, ...rest } = props;
|
||||
return Tag("span", { ...rest, class: className }, children);
|
||||
};
|
||||
Reference in New Issue
Block a user