app / frontend /src /components /landing /Button.jsx
Aissugur Kurganbekov
Claude Opus 4.8
Tamga — evidence-backed customs document audit
373030b
Raw History Blame Contribute Delete
764 Bytes
// Studio landing shared button (SHARED CONTRACT).
// Renders an <a> when `href` is provided, otherwise a <button>.
// Variants: "primary" | "secondary" | "tertiary" -> .st-btn--{variant} (see base.css).
export default function Button({
variant = "primary",
children,
onClick,
href,
ariaLabel,
...rest
}) {
const className = `st-btn st-btn--${variant}`;
if (href) {
return (
<a
className={className}
href={href}
onClick={onClick}
aria-label={ariaLabel}
{...rest}
>
{children}
</a>
);
}
return (
<button
type="button"
className={className}
onClick={onClick}
aria-label={ariaLabel}
{...rest}
>
{children}
</button>
);
}