837f0fa63f
Close deployment IDOR and gate stub payment endpoints, add production secret validation, health probes, Redis-backed build progress, GitHub Actions CI, expanded tests, billing/k8s refactors, and ops runbooks. Co-authored-by: Cursor <cursoragent@cursor.com>
25 lines
603 B
TypeScript
25 lines
603 B
TypeScript
import clsx from 'clsx';
|
|
import type { ButtonHTMLAttributes } from 'react';
|
|
|
|
type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'ghost';
|
|
|
|
const variantClass: Record<ButtonVariant, string> = {
|
|
primary: 'btn-primary',
|
|
secondary: 'btn-secondary',
|
|
danger: 'btn-danger',
|
|
ghost: 'btn-ghost',
|
|
};
|
|
|
|
export function Button({
|
|
variant = 'primary',
|
|
className,
|
|
children,
|
|
...props
|
|
}: ButtonHTMLAttributes<HTMLButtonElement> & { variant?: ButtonVariant }) {
|
|
return (
|
|
<button type="button" className={clsx(variantClass[variant], className)} {...props}>
|
|
{children}
|
|
</button>
|
|
);
|
|
}
|