Class: Tailwinds::Pagination::Base
- Inherits:
-
Tramway::Component::Base
- Object
- ViewComponent::Base
- Tramway::Component::Base
- Tailwinds::Pagination::Base
- Defined in:
- app/components/tailwinds/pagination/base.rb
Overview
Base component for rendering a Kaminari pagination
Direct Known Subclasses
FirstPageComponent, LastPageComponent, NextPageComponent, PageComponent, PrevPageComponent
Instance Method Summary collapse
-
#pagination_classes(klass: nil) ⇒ Object
:reek:UtilityFunction { enabled: false }.
Methods included from Tramway::Helpers::ComponentHelper
Instance Method Details
#pagination_classes(klass: nil) ⇒ Object
:reek:UtilityFunction { enabled: false }
12 13 14 15 16 17 18 |
# File 'app/components/tailwinds/pagination/base.rb', line 12 def pagination_classes(klass: nil) default_classes = ['cursor-pointer', 'px-3', 'py-2', 'font-medium', 'text-purple-700', 'bg-white', 'rounded-md', 'hover:bg-purple-100', 'dark:text-white', 'dark:bg-gray-800', 'dark:hover:bg-gray-700'] (default_classes + [klass]).join(' ') end |