Class: Protos::Accordion
- Inherits:
-
Component
- Object
- Phlex::HTML
- Component
- Protos::Accordion
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
Instance Method Details
#content ⇒ Object
25
|
# File 'lib/protos/accordion.rb', line 25
def content(...) = render Collapse::Content.new(...)
|
#item ⇒ Object
21
22
23
|
# File 'lib/protos/accordion.rb', line 21
def item(*, **, &)
render Item.new(*, input_name: @input_name, **, &)
end
|
#title ⇒ Object
27
28
29
|
# File 'lib/protos/accordion.rb', line 27
def title(*, **, &)
render Collapse::Title.new(*, input_id: @input_name, **, &)
end
|
#view_template ⇒ Object
17
18
19
|
# File 'lib/protos/accordion.rb', line 17
def view_template(&)
ul(**attrs, &)
end
|