Class: UI::H2Component
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::H2Component
- Defined in:
- app/view_components/ui/h2_component.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(classes: nil, **attributes) ⇒ H2Component
constructor
A new instance of H2Component.
Constructor Details
#initialize(classes: nil, **attributes) ⇒ H2Component
Returns a new instance of H2Component.
6 7 8 9 |
# File 'app/view_components/ui/h2_component.rb', line 6 def initialize(classes: nil, **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'app/view_components/ui/h2_component.rb', line 11 def call extend UI::H2Behavior attrs = h2_html_attributes content_tag :h2, **attrs.merge(@attributes) do content end end |