import { JSX } from 'preact/jsx-runtime' import { Icons } from './icons.tsx' interface IconLinkProps { active?: boolean text?: string icon?: keyof (typeof Icons) } export function IconLink( { icon, children, active, ...props }: & IconLinkProps & JSX.HTMLAttributes, ) { const Icon = typeof icon === 'string' ? Icons[icon as keyof typeof Icons] : (() => <>) return ( {icon !== undefined ? ( ) : ''}
{children}
) }