I’m building an interactive component and have defined 4 variants: default
, hovered
, pressed
, and selected
. However, I’m unable to properly switch between them to create a truly interactive component.
Example:
I hover on default
and it changes to hovered
.
I press on hovered
and it changes to pressed
However when I release pressed
I’m not sure how to change to selected
. Tried having onClick
from hovered
to no avail, there’s no onRelease
state.
Additionally noticing this is a problem when a component with a default
and selected
state share a hover state - how does the system know which is on
or off
to switch to when hovered?