JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox" id="toggle" checked />
<span>some text</span>
<input type="submit" name="sendNewSms" class="inputButton" id="sendNewSms" value=" Send " />
JavaScript
$('#toggle').click(function () {
//check if checkbox is checked
if ($(this).is(':checked')) {
$('#sendNewSms').removeAttr('disabled'); //enable input
} else {
$('#sendNewSms').attr('disabled', true); //disable input
}
});