31 lines
688 B
TypeScript
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>
|
|
);
|
|
}
|