mirror of
https://github.com/gnmyt/myspeed.git
synced 2026-02-10 07:39:08 -06:00
15 lines
494 B
JavaScript
15 lines
494 B
JavaScript
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
|
import "./styles.sass";
|
|
|
|
export const Button = ({color = "primary", text, icon, onClick, disabled, size = "md", variant = "filled"}) => {
|
|
return (
|
|
<button
|
|
className={`btn btn-${variant} btn-${color} btn-${size}`}
|
|
onClick={onClick}
|
|
disabled={disabled}
|
|
>
|
|
{icon && <FontAwesomeIcon icon={icon}/>}
|
|
{text && <span>{text}</span>}
|
|
</button>
|
|
);
|
|
} |