JSFiddle - React, Tailwind, and code Playground

HTML

<center><button class="show_content item">Развернуть</button></center>

JavaScript

$(document).ready(function(){
$("button.item:not(.active)").click(function(){
$(this).addClass('active');
$(this).html('Свернуть');
});
$("button.item.active").click(function(){
$(this).removeClass('active');
$(this).html('Развернуть');
});
});