JSFiddle - React, Tailwind, and code Playground
HTML
<div class="file-input">
<div class="attach-receipt">
<button type="button" class="js-attach">Attach Receipt</button>
</div>
<div class="remove-receipt is-hidden">
<button type="button" class="js-remove">Remove</button> Name of the Attached File
</div>
</div>
CSS
.is-hidden {
display: none !important;
}
.file-input {
background: #efefef;
border: 1px solid #ccc;
font-size: 0.7rem;
font-family: sans-serif;
padding: 0.5rem;
width: 75%;
}
JavaScript
$("button").on("click", function() {
$(".file-input > div").toggleClass("is-hidden");
});