Class: PhlexUI::Calendar::Weekdays

Inherits:
Base
  • Object
show all
Defined in:
lib/phlex_ui/calendar/weekdays.rb

Constant Summary collapse

DAYS =
%w[Monday Tuesday Wednesday Thursday Friday Saturday Sunday].freeze

Instance Attribute Summary

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

#before_template, #initialize

Constructor Details

This class inherits a constructor from PhlexUI::Base

Instance Method Details

#view_templateObject



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/phlex_ui/calendar/weekdays.rb', line 7

def view_template
  template_tag(data: {calendar_target: "weekdaysTemplate"}) do
    thead(**attrs) do
      tr(class: "flex") do
        DAYS.each do |day|
          render_day(day)
        end
      end
    end
  end
end