One issue I'm facing is with a BootStrap button that I'm rendering in React. The button has a property or a condition that determines if it's disabled:
<Button bsClass="fill"
disabled={!props.purchaseble}
onClick={console.log("clicked!")}
>Order now</Button>
The button functions correctly without the CSS class, but there is an unwanted animation when hovering over it, even when it's disabled:
Below is the CSS code for the button:
.fill:hover {
color: whitesmoke;
cursor: pointer;
}
.fill:before {
cursor: pointer;
content: "";
position: absolute;
background: #5a320b;
bottom: 0;
left: 0;
right: 0;
top: 100%;
z-index: -1;
-webkit-transition: top 0.09s ease-in;
}
.fill:hover:before {
cursor: pointer;
top: 0;
}
My question is whether these animations still work even when the button is disabled, and if there is a way to prevent the animations from appearing when the button is disabled?