Class: Tailwinds::Pagination::Base

Inherits:
Tramway::BaseComponent 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::ViewsHelper

#tramway_back_button, #tramway_badge, #tramway_button, #tramway_cell, #tramway_container, #tramway_flash, #tramway_form_for, #tramway_header, #tramway_row, #tramway_table, #tramway_title

Methods included from Tramway::Helpers::ComponentHelper

#component

Methods included from Tramway::Helpers::DecorateHelper

#tramway_decorate

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