I'm having trouble applying disabled styling to a button component using SCSS.
The button has multiple classes:
<button
className="button button--size-short-wide button--secondary"
data-cy="letters-compose-message-content-add-photo-button"
onClick={onClickOpenImageLoad}
disabled={true}
>
ADD PHOTO
</button>
There are no style import statements in this file, but there is a buttons.scss
file that styles buttons.
buttons.scss
.button {
@include font-rubik(16px, false, 600);
padding: 16px 24px;
letter-spacing: 0;
text-align: center;
cursor: pointer;
transition: all 0.15s ease-out;
text-decoration: none !important;
&--secondary {
border: 2px solid $blue-darkerer;
background-color: transparent;
color: $blue-darkerer;
text-transform: uppercase;
&.disabled {
border: 2px solid $gray-light !important;
color: $gray-light !important;
cursor: not-allowed !important;
}
}
&--size {
&-big {
height: 64px;
padding: 16px 0;
}
&-short {
padding: 8px 24px;
&-wide {
padding: 8px 48px;
}
}
&-small {
height: 45px;
width: 45px;
border-radius: 6px;
padding: 0 0 0 9px;
}
&--apple {
&-small {
height: 45px;
width: 45px;
border-radius: 6px;
padding: 0 0 0 0px;
}
}
}
}
All other styling works correctly, but the disabled styles are not being applied.