import {
useMemo,
type ButtonHTMLAttributes,
type FC,
type ReactNode,
} from "react";
interface ButtonProps extends ButtonHTMLAttributes {
children: ReactNode;
className?: string;
loading?: boolean;
variant?: "contained" | "outlined" | "text";
}
export const Button: FC = ({
children,
className,
loading,
variant = "contained",
...props
}) => {
const appearance = useMemo(() => {
switch (variant) {
case "contained":
return "bg-blue-600 text-white hover:bg-blue-700";
case "outlined":
return "border border-blue-600 text-blue-600 hover:text-blue-700 font-medium";
case "text":
return "text-blue-600 hover:text-blue-700 font-medium";
}
return "";
}, [variant]);
return (
);
};