Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
You can't directly. It needs to be through a parent.
You also hang an additional class (modifier) on the label,
<label htmlFor={el.name} className={el.checked ? 'checked' : null}>{el.name}</label>
label.checked {
&::after{
/* стили */
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question