Class: PhlexKit::SelectLabel
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::SelectLabel
- 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
-
#initialize(**attrs) ⇒ SelectLabel
constructor
A new instance of SelectLabel.
- #view_template(&block) ⇒ Object
Methods inherited from BaseComponent
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 |