import React, { ReactNode } from 'react'; import { ExternalLink } from 'lucide-react'; interface WikiTooltipProps { children: ReactNode; summary?: string; imagePath?: string; wikiUrl?: string; name: string; } export function WikiTooltip({ children, summary, imagePath, wikiUrl, name }: WikiTooltipProps) { if (!summary && !imagePath) { return {children}; } return (
{children}
{imagePath && (
{name} { (e.target as HTMLImageElement).style.display = 'none'; }} />
)}

{name}

{summary && (

{summary}

)} {wikiUrl && ( e.stopPropagation()} > Ver en Wikipedia )}
{/* Triangle arrow */}
); }