Class: UI::PaginationLinkComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::PaginationLinkComponent
- Includes:
- PaginationLinkBehavior
- Defined in:
- app/view_components/ui/pagination_link_component.rb
Overview
Pagination Link component (ViewComponent) Clickable link for page numbers
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(href: "#", active: false, size: "icon", classes: "", attributes: {}) ⇒ PaginationLinkComponent
constructor
A new instance of PaginationLinkComponent.
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: {}) ⇒ PaginationLinkComponent
Returns a new instance of PaginationLinkComponent.
13 14 15 16 17 18 19 |
# File 'app/view_components/ui/pagination_link_component.rb', line 13 def initialize(href: "#", active: false, size: "icon", classes: "", attributes: {}) @href = href @active = active @size = size @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
21 22 23 24 25 |
# File 'app/view_components/ui/pagination_link_component.rb', line 21 def call content_tag :a, **link_html_attributes do content end end |