Class: StimulusPlumbers::Components::Timeline::Group
- Inherits:
-
Plumber::Base
- Object
- Plumber::Base
- StimulusPlumbers::Components::Timeline::Group
- Defined in:
- lib/stimulus_plumbers/components/timeline/group.rb
Instance Attribute Summary
Attributes inherited from Plumber::Base
Instance Method Summary collapse
Methods inherited from Plumber::Base
Methods included from Plumber::Renderer
#set_slots, #slot_block_for, #slot_kwargs_for, #slot_renderable?
Methods included from Plumber::Options::Aria
Methods included from Plumber::Options::Html
Constructor Details
This class inherits a constructor from StimulusPlumbers::Plumber::Base
Instance Method Details
#render(**kwargs, &block) ⇒ Object
7 8 9 10 11 |
# File 'lib/stimulus_plumbers/components/timeline/group.rb', line 7 def render(**kwargs, &block) content = template.capture(self, &block) = (theme.resolve(:timeline_group), kwargs) template.content_tag(:div, content, **) end |
#section(date:, datetime: nil, **kwargs, &block) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/stimulus_plumbers/components/timeline/group.rb', line 13 def section(date:, datetime: nil, **kwargs, &block) inner_tl = Timeline.new(template) inner_tl.instance_variable_set(:@orientation, :vertical) inner_tl.instance_variable_set(:@interactive, false) events_html = template.capture(inner_tl, &block) section_html = template.content_tag(:div, **(theme.resolve(:timeline_group_section), kwargs)) do render_section_body(date: date, datetime: datetime, events_html: events_html) end template.concat(section_html) end |