Added the Button disabled property

This commit is contained in:
Mathias Wagner
2024-03-09 18:08:48 +01:00
parent 32d2a9369b
commit 48c4113be7
+3 -3
View File
@@ -1,10 +1,10 @@
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
import "./styles.sass";
export const Button = ({color, text, icon, onClick}) => {
export const Button = ({color, text, icon, onClick, disabled}) => {
return (
<button className={`btn btn-color-${color}`} onClick={onClick}>
<FontAwesomeIcon icon={icon} />
<button className={`btn btn-color-${color}`} onClick={onClick} disabled={disabled}>
<FontAwesomeIcon icon={icon}/>
<h1>{text}</h1>
</button>
);