Class: PhlexKit::SelectLabel

Inherits:
BaseComponent show all
Defined in:
app/components/phlex_kit/select/select_label.rb

Overview

A heading labelling a SelectGroup inside PhlexKit::SelectContent (e.g. "Fruits"). See select.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ SelectLabel

Returns a new instance of SelectLabel.



5
6
7
# File 'app/components/phlex_kit/select/select_label.rb', line 5

def initialize(**attrs)
  @attrs = attrs
end

Instance Method Details

#view_template(&block) ⇒ Object



9
10
11
# File 'app/components/phlex_kit/select/select_label.rb', line 9

def view_template(&block)
  h3(**mix({ class: "pk-select-label" }, @attrs), &block)
end