Class: Shadcn::CarouselPreviousComponent

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

Overview

Previous button component

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) ⇒ CarouselPreviousComponent

Returns a new instance of CarouselPreviousComponent.



168
169
170
171
# File 'app/components/shadcn/carousel_component.rb', line 168

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

Instance Method Details

#callObject



173
174
175
# File 'app/components/shadcn/carousel_component.rb', line 173

def call
  (:button, button_content, button_attributes)
end