Class: Components::DropdownHeader

Inherits:
Base
  • Object
show all
Includes:
Phlex::Rails::Helpers::LinkTo
Defined in:
app/components/dropdown_header.rb

Instance Method Summary collapse

Constructor Details

#initialize(text:) ⇒ DropdownHeader

Returns a new instance of DropdownHeader.



6
7
8
# File 'app/components/dropdown_header.rb', line 6

def initialize(text:)
  @text = text
end

Instance Method Details

#view_template ⇒ Object



10
11
12
13
14
# File 'app/components/dropdown_header.rb', line 10

def view_template
  li role: "presentation" do
    h6(class: "dropdown-header") { @text }
  end
end