Class: Protos::Accordion

Inherits:
Component
  • Object
show all
Defined in:
lib/protos/accordion.rb,
lib/protos/accordion/item.rb

Defined Under Namespace

Classes: Item

Instance Method Summary collapse

Methods inherited from Component

#initialize

Constructor Details

This class inherits a constructor from Protos::Component

Instance Method Details

#contentObject



25
# File 'lib/protos/accordion.rb', line 25

def content(...) = render Collapse::Content.new(...)

#itemObject



21
22
23
# File 'lib/protos/accordion.rb', line 21

def item(*, **, &)
  render Item.new(*, input_name: @input_name, **, &)
end

#titleObject



27
28
29
# File 'lib/protos/accordion.rb', line 27

def title(*, **, &)
  render Collapse::Title.new(*, input_id: @input_name, **, &)
end

#view_templateObject



17
18
19
# File 'lib/protos/accordion.rb', line 17

def view_template(&)
  ul(**attrs, &)
end