Class: Shadcn::CarouselItemComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Shadcn::CarouselItemComponent
- Defined in:
- app/components/shadcn/carousel_component.rb
Overview
Individual carousel item
Instance Attribute Summary
Attributes inherited from BaseComponent
#class_name, #data, #html_options
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(orientation: :horizontal, basis: nil, **options) ⇒ CarouselItemComponent
constructor
A new instance of CarouselItemComponent.
Methods inherited from BaseComponent
Methods included from Rails::Helpers::ClassNameHelper
Constructor Details
#initialize(orientation: :horizontal, basis: nil, **options) ⇒ CarouselItemComponent
Returns a new instance of CarouselItemComponent.
139 140 141 142 143 |
# File 'app/components/shadcn/carousel_component.rb', line 139 def initialize(orientation: :horizontal, basis: nil, **) super(**) @orientation = orientation.to_sym @basis = basis end |
Instance Method Details
#call ⇒ Object
145 146 147 |
# File 'app/components/shadcn/carousel_component.rb', line 145 def call content_tag(:div, content, item_attributes) end |