JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<button class="btn exam-int-btn">
<span>Show</span>
<span style="display:none">Hide</span>
</button>
CSS
.exam-int-btn {
width: 100px;
line-height: 2.5em;
justify-content: center;
padding: 0;
font-weight: 400;
color: #ffffff;
background-color: #2196F3;
text-align: center;
border-radius: 4px;
box-shadow: 5px 5px 15px 0 rgba(46,61,73,.15);
transition: all .3s ease;
border: 1px solid transparent;
cursor: pointer;
}
.white {background-color:#fff !important;color:#000}
JavaScript
$(document).ready(function() {
$('button').on('click',function() {
$(this).toggleClass('white').find('span').toggle();
});
});