willoma / bulma-gomponents

Bulma helpers for Gomponents
MIT License
10 stars 1 forks source link

boolean constructor for some attributes #10

Closed willoma closed 5 months ago

willoma commented 5 months ago

For attributes active, selected, etc, currently we have two possibilities (example with b.Option):

What about having something like b.Selected(bool), which would then add attribute "Selected" when the boolean is true, which would be slightly simpler than using gomponents.If?

chrismalek commented 5 months ago

From a user of the library, I think b.Selected(bool) would be cleaner. I am slowly building an app with this and having to switch between the gomponents library and yours is "messy". (very technical term 😄 ).