Class: UI::CarouselPrevious

Inherits:
Base
  • Object
show all
Defined in:
app/components/ui/carousel_previous.rb

Instance Method Summary collapse

Constructor Details

#initialize(classes: nil, **attributes) ⇒ CarouselPrevious

Returns a new instance of CarouselPrevious.



4
5
6
7
# File 'app/components/ui/carousel_previous.rb', line 4

def initialize(classes: nil, **attributes)
  @classes = classes
  @attributes = attributes
end

Instance Method Details

#view_templateObject



9
10
11
12
13
14
15
16
# File 'app/components/ui/carousel_previous.rb', line 9

def view_template(&)
  extend UI::CarouselPreviousBehavior

  render UI::Button.new(**carousel_previous_html_attributes, classes: carousel_previous_classes, variant: :outline, size: :icon) do
    lucide_icon("arrow-left", class: "size-4")
    span(class: "sr-only") { "Previous slide" }
  end
end