import React from 'react'; import './Logo.css'; interface LogoProps { size?: 'sm' | 'md' | 'lg'; showText?: boolean; className?: string; href?: string; onClick?: () => void; } const sizeMap = { sm: { width: 50, height: 50, fontSize: '18px' }, md: { width: 56, height: 56, fontSize: '24px' }, lg: { width: 80, height: 80, fontSize: '28px' } }; export const Logo: React.FC = ({ size = 'md', showText = true, className = '', href = '/', onClick }) => { const dimensions = sizeMap[size]; const textStyle: React.CSSProperties = { fontSize: dimensions.fontSize, letterSpacing: '0.5px', transition: 'color 0.3s ease', WebkitFontSmoothing: 'antialiased', MozOsxFontSmoothing: 'grayscale' }; const content = ( <> AvanzaCast e.currentTarget.style.transform = 'scale(1.1)'} onMouseLeave={(e) => e.currentTarget.style.transform = 'scale(1)'} /> {showText && ( AvanzaCast )} ); const containerStyle: React.CSSProperties = { display: 'flex', alignItems: 'center', gap: '6px', textDecoration: 'none', color: 'inherit' }; // Si hay onClick, renderizar como div clickeable if (onClick) { return (
{content}
); } // Si no, renderizar como link return ( {content} ); };