Class: PhlexKit::SelectGroup

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

Overview

Groups a set of SelectItems (optionally under a SelectLabel) inside a PhlexKit::SelectContent. Plain pass-through wrapper. See select.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ SelectGroup

Returns a new instance of SelectGroup.



5
6
7
# File 'app/components/phlex_kit/select/select_group.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_group.rb', line 9

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