Class: GovukComponent::SectionBreakComponent
- Defined in:
- app/components/govuk_component/section_break_component.rb
Constant Summary collapse
- SIZES =
%w(m l xl).freeze
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(visible: config.default_section_break_visible, size: config.default_section_break_size, classes: [], html_attributes: {}) ⇒ SectionBreakComponent
constructor
A new instance of SectionBreakComponent.
Methods inherited from Base
Constructor Details
#initialize(visible: config.default_section_break_visible, size: config.default_section_break_size, classes: [], html_attributes: {}) ⇒ SectionBreakComponent
Returns a new instance of SectionBreakComponent.
4 5 6 7 8 9 10 11 12 13 14 |
# File 'app/components/govuk_component/section_break_component.rb', line 4 def initialize( visible: config.default_section_break_visible, size: config.default_section_break_size, classes: [], html_attributes: {} ) @visible = visible @size = size super(classes:, html_attributes:) end |
Instance Method Details
#call ⇒ Object
16 17 18 |
# File 'app/components/govuk_component/section_break_component.rb', line 16 def call tag.hr(**html_attributes) end |