Class: UI::EmptyHeaderComponent

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

Overview

EmptyHeaderComponent - ViewComponent implementation

Instance Method Summary collapse

Methods included from EmptyHeaderBehavior

#empty_header_classes, #empty_header_html_attributes

Constructor Details

#initialize(classes: "", **attributes) ⇒ EmptyHeaderComponent

Returns a new instance of EmptyHeaderComponent.



7
8
9
10
# File 'app/view_components/ui/empty_header_component.rb', line 7

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

Instance Method Details

#callObject



12
13
14
15
16
# File 'app/view_components/ui/empty_header_component.rb', line 12

def call
  tag.div(**empty_header_html_attributes.merge(@attributes)) do
    content
  end
end