import * as React from 'react';
import { Colors, Sizes, Variants } from "../../styles";
import StyledButton from "./styled-button";

interface Props {
    color: Colors;
    size: Sizes;
    variant: Variants;
    children?: React.ReactNode;
    onClick?: () => void;
    style?: React.CSSProperties;
    fullWidth?: boolean;
    disabled?: boolean;
    round?: boolean;
}

const Button = (props: Props) => (
    <StyledButton
        variant={props.variant}
        size={props.size}
        color={props.color}
        round={props.round}
        onClick={props.onClick}
        style={props.style}
        fullWidth={props.fullWidth}
        disabled={props.disabled}
    >
        {props.children}
    </StyledButton>
);

Button.defaultProps = {
    color: "primary",
    size: "md",
    variant: "contained",
};

export default Button;
