Class: Shadcn::CarouselContentComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/shadcn/carousel_component.rb

Overview

Container for carousel items

Instance Attribute Summary

Attributes inherited from BaseComponent

#class_name, #data, #html_options

Instance Method Summary collapse

Methods inherited from BaseComponent

#content

Methods included from Rails::Helpers::ClassNameHelper

#cn

Constructor Details

#initialize(orientation: :horizontal, **options) ⇒ CarouselContentComponent

Returns a new instance of CarouselContentComponent.



99
100
101
102
# File 'app/components/shadcn/carousel_component.rb', line 99

def initialize(orientation: :horizontal, **options)
  super(**options)
  @orientation = orientation.to_sym
end

Instance Method Details

#callObject



104
105
106
# File 'app/components/shadcn/carousel_component.rb', line 104

def call
  (:div, wrapper_content, wrapper_attributes)
end