Class: Shadcn::TableBodyComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/shadcn/table_body_component.rb

Overview

Table Body component

Constant Summary collapse

BASE_CLASSES =
"[&_tr:last-child]:border-0"

Instance Attribute Summary

Attributes inherited from BaseComponent

#class_name, #data, #html_options

Instance Method Summary collapse

Methods inherited from BaseComponent

#content, #initialize

Methods included from Rails::Helpers::ClassNameHelper

#cn

Constructor Details

This class inherits a constructor from Shadcn::BaseComponent

Instance Method Details

#callObject



12
13
14
# File 'app/components/shadcn/table_body_component.rb', line 12

def call
  (:tbody, safe_join([rows, content].compact.flatten), class: merge_classes(BASE_CLASSES))
end