centripetum / toolkit

A component toolkit to be used with the Centripetum platform. https://github.com/orgs/centripetum/projects/1
MIT License
0 stars 0 forks source link

ThreeStateField #6

Open the-hanalyst opened 5 years ago

the-hanalyst commented 5 years ago

This field allows the user to choose one of three states, for example: yes, no, maybe. Or true, false, unknown. Or whatever.

Consider whether it should be configurable that the intermediate/indeterminate state can be reselected after choosing one of the other states.

How is this tracked in the state (with useState)? True, false, null (or undefined)? -1, 0, 1? Some other way?

Acceptance criteria 2 buttons both aren't selected initially There is two buttons, you can select none of the buttons or just only 1 button. If you click on the button you’ve already selected it deselects it If you have one button already selected and click on a deselected one it selects the deselected one and deselects the selected one