React (HTML)
<div className={"OK"}>OK</div>
<input type="checkbox" id={"MainPage-checkbox-menu"} />
<label htmlFor={"MainPage-checkbox-menu"}></label>
CSS
#MainPage-checkbox-menu:checked ~ .OK {
color: #8ef6ad;
}
I seem to be doing everything right but the checkbox does not change the color style of the div element. How to make the checkbox change the color of the div element ?