// app/components/HeroButton.tsx
import Link from 'next/link';
import React from 'react';
interface HeroButtonProps {
href?: string;
onClick?: () => void;
children: React.ReactNode;
className?: string;
}
export default function HeroButton({ href, onClick, children, className = "" }: HeroButtonProps) {
const baseStyles = `
text-[#406185] bg-white border-none py-3.5 px-7.5
text-center font-bold uppercase w-fit text-[1.1rem]
transition-all duration-300 hover:scale-105 active:scale-95
shadow-md hover:shadow-lg cursor-pointer inline-block
${className}
`;
if (onClick) {
return (
);
}
if (href) {
const isExternal = href.startsWith('http');
if (isExternal) {
return (
{children}
);
}
return (
{children}
);
}
return null;
}