import styles from "./button.module.css";

const Button = ({ children, variant = "primary", onClick, className }) => {
    let btnStyle;

    if (variant === "primary") btnStyle = styles.primary;
    else if (variant === "danger") btnStyle = styles.danger;
    else if(variant === "transparent") btnStyle = styles.transparent;
    else btnStyle = styles.default;

    return <div className={`${styles.btn} ${btnStyle} ${className}`} onClick={onClick}>
        {children}
    </div>;
};

export default Button;
