CI/CD (dev on branch, prod on tag) / build-and-deploy (push) Successful in 20m35s
24 lines
446 B
TypeScript
24 lines
446 B
TypeScript
import type { SimpleIcon } from "simple-icons";
|
|
|
|
export function BrandIcon({
|
|
icon,
|
|
className,
|
|
color,
|
|
}: {
|
|
icon: SimpleIcon;
|
|
className?: string;
|
|
/** Override the brand colour (dark brand colours vanish on a dark theme). */
|
|
color?: string;
|
|
}) {
|
|
return (
|
|
<svg
|
|
viewBox="0 0 24 24"
|
|
aria-hidden="true"
|
|
className={className}
|
|
fill={color ?? `#${icon.hex}`}
|
|
>
|
|
<path d={icon.path} />
|
|
</svg>
|
|
);
|
|
}
|