Class: UI::H3Component

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/view_components/ui/h3_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(classes: nil, **attributes) ⇒ H3Component

Returns a new instance of H3Component.



5
6
7
8
# File 'app/view_components/ui/h3_component.rb', line 5

def initialize(classes: nil, **attributes)
  @classes = classes
  @attributes = attributes
end

Instance Method Details

#callObject



10
11
12
13
14
15
16
17
# File 'app/view_components/ui/h3_component.rb', line 10

def call
  extend UI::H3Behavior

  attrs = h3_html_attributes
   :h3, **attrs.merge(@attributes) do
    content
  end
end