Class: StimulusPlumbers::Components::Combobox::Date::Navigation

Inherits:
Plumber::Base
  • Object
show all
Defined in:
lib/stimulus_plumbers/components/combobox/date/navigation.rb

Instance Attribute Summary

Attributes inherited from Plumber::Base

#template

Instance Method Summary collapse

Methods inherited from Plumber::Base

#initialize, #theme

Methods included from Plumber::Renderer

#set_slots, #slot_block_for, #slot_kwargs_for, #slot_renderable?

Methods included from Plumber::Options::Aria

#labelled_aria

Methods included from Plumber::Options::Html

#merge_html_options

Constructor Details

This class inherits a constructor from StimulusPlumbers::Plumber::Base

Instance Method Details

#render(step:, stimulus_controller:, view: "month", date: ::Date.today, **kwargs) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/stimulus_plumbers/components/combobox/date/navigation.rb', line 8

def render(step:, stimulus_controller:, view: "month", date: ::Date.today, **kwargs)
  html_options = merge_html_options(
    theme.resolve(:combobox_date_navigation),
    kwargs,
    { aria: { label: "Date picker navigation" } }
  )

  template.(:nav, **html_options) do
    template.safe_join(navigators(stimulus_controller, step, view, date))
  end
end