JSFiddle - React, Tailwind, and code Playground

HTML

<input type="button" value="delete" onclick="showModal('delAll1')">
<div class="delModal" style="display:none" id="delAll1">
    <img src="images/warning.png" />&nbsp;Are you sure you want to delete vessel and the corresponding tanks?
    <br
    />
    <input type="button" value="Cancel" class="hide" onclick="hideModal('delAll1')"
    />
    <input type="button" value="Delete" onclick="delVesselAll(1)" id="delete"
    />
</div>

CSS

div.delModal {
    position:absolute;
    border:solid 1px black;
    padding:8px;
    background-color:white;
    width:160px;
    text-align:right
}

JavaScript

function showModal(id) {
    $("#" + id).fadeIn('slow');
}
function hideModal(id) {
    $("#" + id).fadeOut('slow');
}