JSFiddle - React, Tailwind, and code Playground

HTML

<div id="myDiag">
    Hi
</div>

JavaScript

var diag=$('#myDiag').dialog({
    title: 'Test', 
    autoOpen: false,

	buttons : [{
			text : "Confirm",
			disabled : true,
			id : "my-button-1",
			click : function () {
				$(this).dialog("close");
			}
		}, {
			text : "Enable confirm",
			id : "my-button-enable",
			click : function () {
                // Enable the button
                $("#my-button-1").attr('disabled', false);
			}
		}, {
			text : "Cancel",
			id : "my-button-2",
			click : function () {
				$(this).dialog("close");
			}
		}
	]
});
diag.dialog("open");