Class: UiComponents::DaisyUi::DataDisplay::CarouselComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/ui_components/daisy_ui/data_display/carousel_component.rb

Constant Summary collapse

CSS_CLASSES_DEFAULT =
%w[carousel].freeze
CSS_CLASSES_VARIANTS =
(
  %w[carousel-horizontal carousel-vertical] +
  ALIGNS.map { |key| "carousel-#{key}" }
).freeze
CSS_CLASSES =
(
  CSS_CLASSES_DEFAULT +
  CSS_CLASSES_VARIANTS +
  Carousel::ItemComponent::CSS_CLASSES +
  Carousel::IndicatorComponent::CSS_CLASSES
).freeze

Constants inherited from BaseComponent

BaseComponent::ALIGNS, BaseComponent::AXES, BaseComponent::COLORS, BaseComponent::KINDS, BaseComponent::SIZES

Instance Attribute Summary

Attributes inherited from BaseComponent

#slot_order

Instance Method Summary collapse

Methods inherited from BaseComponent

tracks_slot_order

Constructor Details

#initialize(align: nil, vertical: false, **args) ⇒ CarouselComponent

Returns a new instance of CarouselComponent.



31
32
33
34
35
36
37
38
39
40
# File 'app/components/ui_components/daisy_ui/data_display/carousel_component.rb', line 31

def initialize(
    align: nil,
    vertical: false,
    **args
  )
  @align = align
  @vertical = vertical

  super(**args)
end