Class: UI::CarouselNextComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::CarouselNextComponent
- Defined in:
- app/view_components/ui/carousel_next_component.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(classes: nil, **attributes) ⇒ CarouselNextComponent
constructor
A new instance of CarouselNextComponent.
Constructor Details
#initialize(classes: nil, **attributes) ⇒ CarouselNextComponent
Returns a new instance of CarouselNextComponent.
4 5 6 7 |
# File 'app/view_components/ui/carousel_next_component.rb', line 4 def initialize(classes: nil, **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'app/view_components/ui/carousel_next_component.rb', line 9 def call extend UI::CarouselNextBehavior render UI::ButtonComponent.new(**carousel_next_html_attributes, classes: carousel_next_classes, variant: :outline, size: :icon) do safe_join([ lucide_icon("arrow-right", class: "size-4"), content_tag(:span, "Next slide", class: "sr-only") ]) end end |