Class: Tramway::Pagination::Base
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Tramway::Pagination::Base
- Defined in:
- app/components/tramway/pagination/base.rb
Overview
Base component for rendering a Kaminari pagination
Direct Known Subclasses
FirstPageComponent, LastPageComponent, NextPageComponent, PageComponent, PrevPageComponent
Constant Summary
Constants included from Helpers::ViewsHelper
Helpers::ViewsHelper::FORM_SIZES
Instance Method Summary collapse
Methods included from Helpers::ViewsHelper
#tramway_back_button, #tramway_badge, #tramway_button, #tramway_cell, #tramway_chat, #tramway_container, #tramway_flash, #tramway_form_for, #tramway_header, #tramway_main_container, #tramway_row, #tramway_table, #tramway_title
Methods included from Helpers::ComponentHelper
Methods included from Helpers::DecorateHelper
Instance Method Details
#pagination_classes(klass: nil) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'app/components/tramway/pagination/base.rb', line 11 def pagination_classes(klass: nil) default_classes = %w[ inline-flex items-center justify-center h-10 px-3 py-2 rounded-md border border-zinc-800 bg-zinc-950 text-sm font-medium text-zinc-100 shadow-sm transition-colors hover:bg-zinc-800 hover:text-zinc-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-400 focus-visible:ring-offset-2 focus-visible:ring-offset-zinc-950 ] (default_classes + [klass]).join(' ') end |