Class: StimulusPlumbers::Components::DatePicker::Navigation

Inherits:
Plumber::Base
  • Object
show all
Defined in:
lib/stimulus_plumbers/components/date_picker/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::HtmlOptions

#merge_html_options, #merge_string_option, #normalize_part

Constructor Details

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

Instance Method Details

#render(stimulus_controller:, step:, **kwargs) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'lib/stimulus_plumbers/components/date_picker/navigation.rb', line 7

def render(stimulus_controller:, step:, **kwargs)
  html_options = merge_html_options(
    { classes: theme.resolve(:calendar_navigation).fetch(:classes, ""), aria: { label: "DatePicker Navigation" } },
    kwargs
  )

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