Class: StimulusPlumbers::Components::Divider
- Inherits:
-
Plumber::Base
- Object
- Plumber::Base
- StimulusPlumbers::Components::Divider
- Defined in:
- lib/stimulus_plumbers/components/divider.rb
Instance Attribute Summary
Attributes inherited from Plumber::Base
Instance Method Summary collapse
Methods inherited from Plumber::Base
Methods included from Plumber::Renderer
#set_slots, #slot_block_for, #slot_kwargs_for, #slot_renderable?
Methods included from Plumber::Options::Aria
Methods included from Plumber::Options::Html
Constructor Details
This class inherits a constructor from StimulusPlumbers::Plumber::Base
Instance Method Details
#render(label = nil, **kwargs) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/stimulus_plumbers/components/divider.rb', line 6 def render(label = nil, **kwargs) divider_opts = ( theme.resolve(:divider), kwargs ) template.content_tag(:div, role: "separator", **divider_opts) do if label.blank? template.tag.hr(**divider_separator_opts) else render_with(label) end end end |