Class: UI::PaginationLink
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::PaginationLink
- Includes:
- PaginationLinkBehavior
- Defined in:
- app/components/ui/pagination_link.rb
Overview
Pagination Link component (Phlex) Clickable link for page numbers
Instance Method Summary collapse
-
#initialize(href: "#", active: false, size: "icon", classes: "", attributes: {}) ⇒ PaginationLink
constructor
A new instance of PaginationLink.
- #view_template(&block) ⇒ Object
Methods included from PaginationLinkBehavior
#link_base_classes, #link_classes, #link_html_attributes, #link_size_classes, #link_variant_classes
Constructor Details
#initialize(href: "#", active: false, size: "icon", classes: "", attributes: {}) ⇒ PaginationLink
Returns a new instance of PaginationLink.
13 14 15 16 17 18 19 20 |
# File 'app/components/ui/pagination_link.rb', line 13 def initialize(href: "#", active: false, size: "icon", classes: "", attributes: {}, **) @href = href @active = active @size = size @classes = classes @attributes = attributes super() end |
Instance Method Details
#view_template(&block) ⇒ Object
22 23 24 |
# File 'app/components/ui/pagination_link.rb', line 22 def view_template(&block) a(**link_html_attributes, &block) end |