We essentially have all the primitives we need for a checkbox control - it's basically a stateful button.
It could be implemented using the state hook to persist the state (checked / not checked), and provide a callback as a prop that can be called when that state changes.
The API could be something like <Checkbox value={true} onValueChanged={r => print_endline("New value: " ++ string_of_bool(r)} />
We could use the font awesome icons check-square and square for the glyph.
Examples of other custom components are available here, and would be useful to see how to get started adding a new one: https://github.com/revery-ui/revery/tree/master/src/UI_Components
I'd love to take this on. I would also love to make an example for this. Maybe a todo list with each todo item being a checkbox.
@schinns awesome, maybe that can solve #42 as well.
@schinns wow, this is going fast, it looks like @Akin909 already made a fix for it. Maybe you can still have a stab at the todo list. Or look at the radiobuttons? #245
Woops sorry wasn't watching this :man_facepalming: but #42 @tcoopman suggestion is :100:
haha no worries! I will take a stab at the radio button. As soon as https://github.com/revery-ui/revery/pull/252 is merged in, I will make a todo example!
Most helpful comment
@schinns awesome, maybe that can solve #42 as well.