Element.style.x
const style = { backgroundColor: primary ? "blue" : "gray", color: "white", padding: "10px 20px", border: "none", }; return <button style={style}>Click Me</button>; }