Class: PhlexKit::CarouselContent
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::CarouselContent
- Defined in:
- app/components/phlex_kit/carousel/carousel_content.rb
Overview
The clipping viewport + sliding track holding the CarouselItems. The controller translates the track; orientation styling comes from the parent .pk-carousel's is-horizontal/is-vertical modifier. See carousel.rb.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ CarouselContent
constructor
A new instance of CarouselContent.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ CarouselContent
Returns a new instance of CarouselContent.
6 7 8 |
# File 'app/components/phlex_kit/carousel/carousel_content.rb', line 6 def initialize(**attrs) @attrs = attrs end |
Instance Method Details
#view_template ⇒ Object
10 11 12 13 14 |
# File 'app/components/phlex_kit/carousel/carousel_content.rb', line 10 def view_template(&) div(class: "pk-carousel-viewport", data: { phlex_kit__carousel_target: "viewport" }) do div(**mix({ class: "pk-carousel-track" }, @attrs), &) end end |