({ name, className, ...props }: IconLinkProps)
| 8 | } |
| 9 | |
| 10 | export const IconLink = ({ name, className, ...props }: IconLinkProps) => { |
| 11 | const { href } = props |
| 12 | const isExternal = typeof href === "string" && /^https?:\/\//i.test(href) |
| 13 | return ( |
| 14 | <a |
| 15 | className={cn( |
| 16 | "group relative inline-flex cursor-pointer items-center justify-center rounded-full text-[var(--color-text-active)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-border)] focus-visible:ring-offset-2", |
| 17 | className |
| 18 | )} |
| 19 | target={isExternal ? "_blank" : undefined} |
| 20 | rel="noopener noreferrer" |
| 21 | aria-label={name} |
| 22 | href={href} |
| 23 | {...props} |
| 24 | > |
| 25 | <Icon name={name} className="size-4 transition-transform duration-300 xl:size-5" /> |
| 26 | </a> |
| 27 | ) |
| 28 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…