- Replace hardcoded hex colors with gold/gold-light/gold-dark Tailwind tokens - Extract Schedule into DayCard, ScheduleFilters, MobileSchedule sub-components - Extract Team into TeamCarousel, TeamMemberInfo sub-components - Add UI_CONFIG for centralized magic numbers (timings, thresholds) - Add reusable IconBadge component, simplify Contact section - Convert Pricing clickable divs to semantic buttons for a11y - Remove unused SocialLinks, btn-outline, btn-ghost, nav-link CSS classes - Fix React setState-during-render error in TeamCarousel (deferred update pattern) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
40 lines
668 B
TypeScript
40 lines
668 B
TypeScript
import Link from "next/link";
|
|
|
|
interface ButtonProps {
|
|
href?: string;
|
|
size?: "sm" | "md" | "lg";
|
|
children: React.ReactNode;
|
|
className?: string;
|
|
onClick?: () => void;
|
|
}
|
|
|
|
const sizes = {
|
|
sm: "px-4 py-2 text-sm",
|
|
md: "px-6 py-3 text-base",
|
|
lg: "px-8 py-4 text-lg",
|
|
};
|
|
|
|
export function Button({
|
|
href,
|
|
size = "md",
|
|
children,
|
|
className = "",
|
|
onClick,
|
|
}: ButtonProps) {
|
|
const classes = `btn-primary ${sizes[size]} ${className}`;
|
|
|
|
if (href) {
|
|
return (
|
|
<Link href={href} className={classes}>
|
|
{children}
|
|
</Link>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<button onClick={onClick} className={classes}>
|
|
{children}
|
|
</button>
|
|
);
|
|
}
|