Class: Tailwinds::Table::HeaderComponent

Inherits:
Tramway::BaseComponent show all
Defined in:
app/components/tailwinds/table/header_component.rb

Overview

Component for rendering a header in a table

Constant Summary

Constants included from Tramway::Helpers::ViewsHelper

Tramway::Helpers::ViewsHelper::FORM_SIZES

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_main_container, #tramway_row, #tramway_table, #tramway_title

Methods included from Tramway::Helpers::ComponentHelper

#component

Methods included from Tramway::Helpers::DecorateHelper

#tramway_decorate

Instance Method Details

#columns_countObject



10
11
12
# File 'app/components/tailwinds/table/header_component.rb', line 10

def columns_count
  headers.present? ? headers.size : columns
end

#header_cell_classesObject



20
21
22
# File 'app/components/tailwinds/table/header_component.rb', line 20

def header_cell_classes
  'div-table-cell py-4 px-6 first:block hidden md:block'
end

#header_row_classesObject



14
15
16
17
18
# File 'app/components/tailwinds/table/header_component.rb', line 14

def header_row_classes
  theme_classes(
    classic: 'div-table-row rounded-t-xl grid text-small gap-4 bg-gray-800 text-gray-500 grid-cols-1'
  )
end