I've converted the checkable_label method to an HtmlBlock context.
This flows better to me as the idea behind the html_blocks is to define what you want your html to look like. Defining simple html in a method is fine, but when it gets more complex it should really be an html_block.
You can provide your own block by overriding it in your class e.g.
html(:checkable_label) do |input|
Formular::Elements::Label.(input.options[:label_options]) do
concat input.to_html(context: :default)
concat Span.()
concat " #{input.label_text}"
end
end
Fixes #5.
I've converted the checkable_label method to an HtmlBlock context.
This flows better to me as the idea behind the html_blocks is to define what you want your html to look like. Defining simple html in a method is fine, but when it gets more complex it should really be an html_block.
You can provide your own block by overriding it in your class e.g.