|
|
|
|
|
by leggomuhgreggo
1555 days ago
|
|
Nice! It's funny that buttons are the "Hello World" of frontend components, because they're actually feverishly nuanced. I wrote a proof of concept for one of these, using XState, a few months back. My use case was a cross platform react native button -- which means there's technically a difference between "pressed" and "hover" -- and there's also a loading state, which required special handling for the a11y state. https://codesandbox.io/s/fervent-shirley-dgesq?file=/src/Pre... NOTE: this will open a popup (might have to enable popups) with the visualizer, and it defaults to the a11y machine, but there's a drop down to switch to the main button machine. |
|