import type { JSX } from 'preact'; import { type ForwardedRef, forwardRef } from 'preact/compat'; export interface SVGIconProps { size?: number | Array; name: string; fill?: string; stroke?: string; className?: string; externalURL?: string; style?: JSX.CSSProperties; } export const Icon = forwardRef(({ size = 15, name, fill = 'currentColor', stroke = 'currentColor', className, externalURL = '', style, }: SVGIconProps, ref: ForwardedRef) => { const width = Array.isArray(size) ? size[0] : size; const height = Array.isArray(size) ? size[1] || size[0] : size; const path = `${externalURL}#${name}`; return ( {name} ); });