JSFiddle - React, Tailwind, and code Playground
HTML
<form>
<input id="toggleDisabled" type="button" value="Enable send" />
<input id="sendInvite" class="mail_send" disabled="disabled" type="button" name="invite" value="Send" />
</form>
CSS
.mail_send:disabled {background-color:#343434; color:#747474}
JavaScript
$("#toggleDisabled").click(function() {
if ($("#sendInvite").is(":disabled"))
{
$("#toggleDisabled").val("Disable send");
$("#sendInvite").prop("disabled", false);
}
else
{
$("#toggleDisabled").val("Enable send");
$("#sendInvite").prop("disabled", "disabled");
}
});