import React from 'react';
import './style/index.less';

interface VmButtonProps {
    active?: boolean;
    name?: string;
    style?: React.CSSProperties;
    onClick?: () => void;
}

const VmButton = ({ name, active = false, style = {}, onClick }: VmButtonProps) => {
    return (
        <div
            onClick={() => onClick && onClick()}
            className={active ? 'vm-button--active' : 'vm-button'}
            style={style}
        >
            {name}
        </div>
    );
};

export default VmButton;
