Class: Shadcn::TableCellComponent

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

Overview

Table Cell component

Constant Summary collapse

BASE_CLASSES =
"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"

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



8
9
10
# File 'app/components/shadcn/table_cell_component.rb', line 8

def call
  (:td, content, class: merge_classes(BASE_CLASSES), **html_options)
end