Class: PhlexKit::Pagination
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::Pagination
- Defined in:
- app/components/phlex_kit/pagination/pagination.rb
Overview
Page navigation. Ported from ruby_ui's RubyUI::Pagination. Compose Pagination > PaginationContent > PaginationItem(href:, active:) / PaginationEllipsis.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ Pagination
constructor
A new instance of Pagination.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ Pagination
Returns a new instance of Pagination.
5 |
# File 'app/components/phlex_kit/pagination/pagination.rb', line 5 def initialize(**attrs) = (@attrs = attrs) |
Instance Method Details
#view_template ⇒ Object
6 7 8 |
# File 'app/components/phlex_kit/pagination/pagination.rb', line 6 def view_template(&) nav(**mix({ class: "pk-pagination", role: "navigation", aria: { label: "pagination" } }, @attrs), &) end |