Files
vibemake-pcb-studio/designer/src/platform/SiteIcon.tsx
T
likang 1fde96c05e
CI / typecheck + test + build (push) Has been cancelled
打通vibemake
2026-11-05 16:21:37 +08:00

31 lines
688 B
TypeScript

// SPDX-License-Identifier: GPL-3.0-or-later
import { createElement } from 'react';
import { SITE_ICONS } from '../assets/site-brand/navigation.js';
export function SiteIcon({
name,
size = 18,
}: {
name: keyof typeof SITE_ICONS;
size?: number;
}): JSX.Element {
return (
<svg
className="ic"
width={size}
height={size}
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="1.7"
strokeLinecap="round"
strokeLinejoin="round"
aria-hidden="true"
>
{SITE_ICONS[name].map((shape) =>
createElement(shape.tag, { ...shape.attributes, key: JSON.stringify(shape) }),
)}
</svg>
);
}