Class: UI::PaginationNext
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::PaginationNext
- Includes:
- PaginationNextBehavior
- Defined in:
- app/components/ui/pagination_next.rb
Overview
Pagination Next component (Phlex) Next page button with icon and text
Instance Method Summary collapse
-
#initialize(href: "#", classes: "", attributes: {}) ⇒ PaginationNext
constructor
A new instance of PaginationNext.
- #view_template ⇒ Object
Methods included from PaginationNextBehavior
#next_additional_classes, #next_attributes, #next_classes
Constructor Details
#initialize(href: "#", classes: "", attributes: {}) ⇒ PaginationNext
Returns a new instance of PaginationNext.
11 12 13 14 15 16 |
# File 'app/components/ui/pagination_next.rb', line 11 def initialize(href: "#", classes: "", attributes: {}, **) @href = href @classes = classes @attributes = attributes super() end |
Instance Method Details
#view_template ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'app/components/ui/pagination_next.rb', line 18 def view_template(&) render UI::PaginationLink.new( href: @href, size: "default", classes: next_classes, attributes: next_attributes ) do span(class: "hidden sm:block") { "Next" } 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 |s| s.path(d: "m9 18 6-6-6-6") end end end |