JSFiddle - React, Tailwind, and code Playground

HTML

<input type="checkbox" checked="checked" id="checky"><a href="#">terms and conditions</a>
<input type="submit" id="postme" value="submit">

JavaScript

$('#checky').click(function(){
    
    if($(this).checked == false){
         $('#postme').attr("disabled","disabled");   
    }
    else
        $('#postme').removeAttr('disabled');
});