Class: PhlexKit::CalendarPrev
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::CalendarPrev
- Defined in:
- app/components/phlex_kit/calendar/calendar_prev.rb
Overview
Previous-month button, pinned to the header's left edge. See calendar.rb.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ CalendarPrev
constructor
A new instance of CalendarPrev.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ CalendarPrev
Returns a new instance of CalendarPrev.
4 5 6 |
# File 'app/components/phlex_kit/calendar/calendar_prev.rb', line 4 def initialize(**attrs) @attrs = attrs end |
Instance Method Details
#view_template ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/components/phlex_kit/calendar/calendar_prev.rb', line 8 def view_template (**mix({ type: :button, name: "previous-month", class: "pk-calendar-prev", aria: { label: "Go to previous month" }, data: { action: "click->phlex-kit--calendar#prevMonth" } }, @attrs)) do icon end end |