24 lines
491 B
TypeScript
24 lines
491 B
TypeScript
export default function Button({
|
|
children,
|
|
type,
|
|
variant,
|
|
className,
|
|
...props
|
|
}: {
|
|
children: React.ReactNode;
|
|
type: "primary" | "secondary" | "alternate";
|
|
variant?: "filled" | "outlined";
|
|
className?: string;
|
|
// [x: string]:
|
|
}) {
|
|
const btnVariant = variant ?? "filled";
|
|
return (
|
|
<button
|
|
className={`button-${type} button-${btnVariant} transition whitespace-nowrap flex items-center ${className}`}
|
|
{...props}
|
|
>
|
|
{children}
|
|
</button>
|
|
);
|
|
}
|