Module: UI::TableCellBehavior
- Included in:
- TableCell, TableCellComponent
- Defined in:
- app/behaviors/ui/table_cell_behavior.rb
Overview
UI::TableCellBehavior
Instance Method Summary collapse
Instance Method Details
#cell_classes ⇒ Object
22 23 24 25 26 27 |
# File 'app/behaviors/ui/table_cell_behavior.rb', line 22 def cell_classes TailwindMerge::Merger.new.merge([ cell_base_classes, @classes ].compact.join(" ")) end |
#cell_html_attributes ⇒ Object
18 19 20 |
# File 'app/behaviors/ui/table_cell_behavior.rb', line 18 def cell_html_attributes {class: cell_classes} end |
#render_cell(&content_block) ⇒ Object
13 14 15 16 |
# File 'app/behaviors/ui/table_cell_behavior.rb', line 13 def render_cell(&content_block) all_attributes = cell_html_attributes.deep_merge(@attributes) content_tag(:td, **all_attributes, &content_block) end |