import React, {ButtonHTMLAttributes, DetailedHTMLProps, FunctionComponent} from "react";

interface ButtonProps extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {

}

export const NoButton: FunctionComponent<ButtonProps> = (props) => {

    const {className, ...rest} = props;

    return (
        <button className={getClassName("no-button", className)} {...rest}/>
    );
}

export const Button: FunctionComponent<ButtonProps> = (props) => {
    const {className, ...rest} = props;

    return (
        <button className={getClassName("button", className)} {...rest}/>
    );
}

const getClassName = (templateClass: string, otherClass?: string) => {
    return templateClass + (otherClass ? ` ${otherClass}` : "");
}