Class: PhlexUI::Accordion::Builder
- Defined in:
- lib/phlex_ui/accordion/builder.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from PhlexUI::Base
Instance Method Details
#add_item(title, content, open: false) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/phlex_ui/accordion/builder.rb', line 11 def add_item(title, content, open: false) render Accordion::Item.new(open: open) do render PhlexUI::Accordion::Trigger.new do render PhlexUI::Accordion::DefaultTrigger.new { title } end render PhlexUI::Accordion::Content.new do render PhlexUI::Accordion::DefaultContent.new { content } end end end |