Class: UI::CarouselNext

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of CarouselNext.



4
5
6
7
# File 'app/components/ui/carousel_next.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_next.rb', line 9

def view_template(&)
  extend UI::CarouselNextBehavior

  render UI::Button.new(**carousel_next_html_attributes, classes: carousel_next_classes, variant: :outline, size: :icon) do
    lucide_icon("arrow-right", class: "size-4")
    span(class: "sr-only") { "Next slide" }
  end
end