Class: UI::PaginationNextComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::PaginationNextComponent
- Includes:
- PaginationNextBehavior
- Defined in:
- app/view_components/ui/pagination_next_component.rb
Overview
Pagination Next component (ViewComponent) Next page button with icon and text
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(href: "#", classes: "", attributes: {}) ⇒ PaginationNextComponent
constructor
A new instance of PaginationNextComponent.
Methods included from PaginationNextBehavior
#next_additional_classes, #next_attributes, #next_classes
Constructor Details
#initialize(href: "#", classes: "", attributes: {}) ⇒ PaginationNextComponent
Returns a new instance of PaginationNextComponent.
11 12 13 14 15 |
# File 'app/view_components/ui/pagination_next_component.rb', line 11 def initialize(href: "#", classes: "", attributes: {}) @href = href @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'app/view_components/ui/pagination_next_component.rb', line 17 def call render UI::PaginationLinkComponent.new( href: @href, size: "default", classes: next_classes, attributes: next_attributes ) do content_tag(:span, "Next", class: "hidden sm:block") + content_tag(:svg, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "size-4") do content_tag(:path, nil, d: "m9 18 6-6-6-6") end end end |