Support for the checkbox group elements
BlockBox has been super lovely, though I notice it doesn’t currently support the checkbox group eleement. Currently it's easy enough to just do
radio_buttons(
"action_id",
[option_1, option_2]
)
|> Map.put(:type, "checkboxes")
|> Map.put(:initial_options, [option_2])
…though it'd be nice to have it in the BlockBox toolbox. Happy to make a PR if that'd be welcome!
hell yeah man! I believe all the development for BlockBox happened before checkboxes were a thing so it'd be nice to add them. You'd want to add a function to block_elements.ex and add a line to the __using__ macro in blockbox.ex.
Don't forget to add documentation and testing. See radio button's docs and tests for an example on how to do that. They seem very similar so a couple minor tweaks is all you'll need.
I just finished exams for this term so I could get this and the other issue done for a 1.1.2 release pretty soon :)
I went ahead and did this myself in PR #11 along with a few other things. dont sweat it!
It's all published to hex under version 1.1.2