Class: Protos::Carousel

Inherits:
Component
  • Object
show all
Defined in:
lib/protos/carousel.rb,
lib/protos/carousel/item.rb,
lib/protos/carousel/actions.rb

Defined Under Namespace

Classes: Actions, Item

Constant Summary collapse

Positions =
Types::Coercible::Symbol.enum(
  :none,
  :center,
  :end
)
SNAP_POINTS =
{
  none: "",
  center: "carousel-center",
  end: "carousel-end"
}.freeze

Instance Method Summary collapse

Methods inherited from Component

#initialize

Constructor Details

This class inherits a constructor from Protos::Component

Instance Method Details

#actionsObject



36
# File 'lib/protos/carousel.rb', line 36

def actions(...) = render Actions.new(...)

#itemObject



34
# File 'lib/protos/carousel.rb', line 34

def item(...) = render Item.new(...)

#view_templateObject



30
31
32
# File 'lib/protos/carousel.rb', line 30

def view_template(&)
  div(**attrs, &)
end