I ma working on a React project, I am trying to define an a state to a button. But state is not applying to a button can you please correct me
This is my code
This is App.js
import React, { useState } from "react";
import { Button } from "antd"
import 'antd/dist/antd.css';
import "./App.css";
const App = () => {
const [buttonOne, setButtonOne] = useState("red")
const [buttonTwo, setButtonTwo] = useState({
backgroundColor: "red",
color: "black",
border: "red"
})
return (
<div>
<Button style={{backgroundColor: buttonOne, border: buttonOne}} className="one" type="primary">First</Button>
<Button style={{backgroundColor: buttonTwo, color: buttonTwo, border: buttonTwo}} className="two" type="primary">Second</Button>
</div>
)
}
export default App
````