Class: Tailwinds::Pagination::Base

Inherits:
Tramway::Component::Base show all
Defined in:
app/components/tailwinds/pagination/base.rb

Overview

Base component for rendering a Kaminari pagination

Instance Method Summary collapse

Methods included from Tramway::Helpers::ComponentHelper

#component

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