Closed milogert closed 5 years ago
I have the same problem. I'd like to do:
but because the checkbox is a block display, even if I put the bold href after it, it goes to the next line.
What I've done in my UI packages is to make the lbl a Html msg
, ie:
type Checkbox msg
= Checkbox
{ options : List (Option msg)
-- , label : String
, label : Html msg
}
The consequence of this that it will break your API, and the callers won't be as nice:
-- currently
checkbox "I Agree to the terms" value msg
-- after
checkbox (Html.text "I agree to the terms") value msg
But at least then you can use custom for the latter cases and keep the simple case the same.
In the view, Html.text is simply removed:
view =
...
-- [ Html.text chk.label ]
[ chk.label ]
I'm happy to provide a PR if something like this aligns with the goals of the project.
I noticed that
Bootstrap.Form.Checkbox.checkbox
(andcustom
) only allows aString
as a display value.Is it possible to display html there? For instance, if I had a checkbox that was like
If it's not possible could this be added? Might be nice to have for situations like the above.