All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 4s
14 lines
450 B
JavaScript
14 lines
450 B
JavaScript
// components/Icon.js
|
|
import { Tag } from "sigpro";
|
|
|
|
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);
|
|
}; |