You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to select a child on the hover of a parent. I am mimicking Material's state layer which changes color or opacity on hover and pressed states.
I have a base class for the Button and if I use last-child I am able to select the state layer, but the state layer is conditionally rendered, so it won't work in all cases:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to select a child on the hover of a parent. I am mimicking Material's state layer which changes color or opacity on hover and pressed states.
I have a base class for the Button and if I use
last-child
I am able to select the state layer, but the state layer is conditionally rendered, so it won't work in all cases:I have base styles for the state layer and I'd like to use the
button_state_layer
class in the above codethis is ideal but not working:
Link to the code: https://codesandbox.io/s/theme-tokens-playground-r9yvcc?file=/src/components/Button/Button.tsx:4591-4743
Beta Was this translation helpful? Give feedback.
All reactions