Class: PhlexKit::CarouselNext
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::CarouselNext
- Defined in:
- app/components/phlex_kit/carousel/carousel_next.rb
Overview
Next-slide button — the CarouselPrevious counterpart on the trailing edge. See carousel.rb.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ CarouselNext
constructor
A new instance of CarouselNext.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ CarouselNext
Returns a new instance of CarouselNext.
5 6 7 |
# File 'app/components/phlex_kit/carousel/carousel_next.rb', line 5 def initialize(**attrs) @attrs = attrs end |
Instance Method Details
#view_template ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'app/components/phlex_kit/carousel/carousel_next.rb', line 9 def view_template render Button.new(variant: :outline, icon: true, disabled: true, **mix({ class: "pk-carousel-next", data: { action: "click->phlex-kit--carousel#scrollNext", phlex_kit__carousel_target: "nextButton" } }, @attrs)) do icon span(class: "pk-sr-only") { "Next slide" } end end |