Class: PhlexKit::CalendarTitle
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::CalendarTitle
- Defined in:
- app/components/phlex_kit/calendar/calendar_title.rb
Overview
"Month Year" heading — rewritten by the controller as you navigate. See calendar.rb.
Instance Method Summary collapse
-
#initialize(default: "Month Year", **attrs) ⇒ CalendarTitle
constructor
A new instance of CalendarTitle.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(default: "Month Year", **attrs) ⇒ CalendarTitle
Returns a new instance of CalendarTitle.
5 6 7 8 |
# File 'app/components/phlex_kit/calendar/calendar_title.rb', line 5 def initialize(default: "Month Year", **attrs) @default = default @attrs = attrs end |
Instance Method Details
#view_template ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'app/components/phlex_kit/calendar/calendar_title.rb', line 10 def view_template div(**mix({ class: "pk-calendar-title", role: "presentation", aria: { live: "polite" }, data: { phlex_kit__calendar_target: "title" } }, @attrs)) { @default } end |