All checks were successful
Docker Deploy / build-and-push (push) Successful in 3m48s
28 lines
532 B
Plaintext
28 lines
532 B
Plaintext
---
|
|
import { icons, type IconName } from "../config/icons";
|
|
|
|
interface Props {
|
|
name: IconName;
|
|
class?: string;
|
|
"class:list"?: any;
|
|
}
|
|
|
|
const { name, class: className, "class:list": classList } = Astro.props;
|
|
const svg = icons[name];
|
|
|
|
if (!svg) {
|
|
throw new Error(`Icon "${name}" not found in icon registry`);
|
|
}
|
|
---
|
|
|
|
<svg
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
viewBox="0 0 24 24"
|
|
width="1em"
|
|
height="1em"
|
|
fill="none"
|
|
class:list={[className, classList]}
|
|
aria-hidden="true"
|
|
set:html={svg}
|
|
/>
|