What is syntax for selector in CSS for next element?
If I have a header tag <h1 class="hc-reform">title</h1>
If I have a header tag <h1 class="hc-reform">title</h1>
I have got the beginnings of a clickable list component that will serve to drive a select element. As you can see from the below, onClick
of the ListItem
, I’m passing the state of a child element (ListItem
in this case) to the parents (SelectableList
, and CustomSelect
component). This is working fine. However, what I would also like to do is change the state of the sibling components (the other ListItems) so that I can toggle their selected states when one of the ListItems is clicked.
I’ve tried reading through questions about sibling imports and even the
package documentation, but I’ve yet to find an answer.