Class: RBUI::ComboboxGroup

Inherits:
Base
  • Object
show all
Defined in:
lib/rbui/combobox/combobox_group.rb

Constant Summary

Constants inherited from Base

Base::TAILWIND_MERGER

Instance Attribute Summary

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

#before_template

Constructor Details

#initialize(heading: nil, **attrs) ⇒ ComboboxGroup

Returns a new instance of ComboboxGroup.



5
6
7
8
# File 'lib/rbui/combobox/combobox_group.rb', line 5

def initialize(heading: nil, **attrs)
  @heading = heading
  super(**attrs)
end

Instance Method Details

#view_template(&block) ⇒ Object



10
11
12
13
14
15
# File 'lib/rbui/combobox/combobox_group.rb', line 10

def view_template(&block)
  div(**attrs) do
    render_header if @heading
    render_items(&block)
  end
end