Class: StimulusPlumbers::Components::Calendar

Inherits:
Plumber::Base show all
Defined in:
lib/stimulus_plumbers/components/calendar.rb,
lib/stimulus_plumbers/components/calendar/month/turbo.rb,
lib/stimulus_plumbers/components/calendar/month/turbo/days_of_week.rb,
lib/stimulus_plumbers/components/calendar/month/turbo/days_of_month.rb

Defined Under Namespace

Modules: Month

Constant Summary collapse

STIMULUS_CONTROLLER =
"calendar-month"
OBSERVER_STIMULUS_CONTROLLER =
"calendar-month-observer"
STIMULUS_DATA =
{
  controller: "#{STIMULUS_CONTROLLER} #{OBSERVER_STIMULUS_CONTROLLER}",
  action:     "click->#{OBSERVER_STIMULUS_CONTROLLER}#select"
}.freeze

Constants included from Plumber::HtmlOptions

Plumber::HtmlOptions::STIMULUS_SPACEJOIN_KEYS

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

#extract_classes, #merge_data_options, #merge_html_options, #merge_string_option, #normalize_part

Constructor Details

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

Instance Method Details

#month(**kwargs) ⇒ Object



13
14
15
16
17
# File 'lib/stimulus_plumbers/components/calendar.rb', line 13

def month(**kwargs)
  template.(:div, role: "grid", **month_html_options(kwargs)) do
    template.safe_join([template.tag.div(**dow_options), template.tag.div(**dom_options)])
  end
end