I'm trying to style the below type of styles in a React.js but I have no idea to change color according to react variable. The code is as follows:
CSS:
.toggle input:checked + .slider {
  background-color: ${color};
}
React:
const { color } = userDoc.data()
return(
            <div className="toggle">
              <label className="switch">
                <input type="checkbox" onChange={onChangeIsLve} checked={isActive}/>
                <span className="slider round"></span>
              </label>
            </div>
)
 
    