JSFiddle - React, Tailwind, and code Playground
HTML
<button id="color">Красный</button>
<button id="style">Жирный</button>
<p id="change">текст текст текст текст текст</p>
JavaScript
$("button").on("click",function(){
($(this).attr("id") == "color") ? $("#change").css({"color":"red"}) : $("#change").css({"font-weight":"bold"});
});