Module: UI::TableBehavior
- Included in:
- Table, TableComponent
- Defined in:
- app/behaviors/ui/table_behavior.rb
Overview
UI::TableBehavior
Instance Method Summary collapse
Instance Method Details
#render_table(&content_block) ⇒ Object
15 16 17 18 |
# File 'app/behaviors/ui/table_behavior.rb', line 15 def render_table(&content_block) all_attributes = table_html_attributes.deep_merge(@attributes) content_tag(:table, **all_attributes, &content_block) end |
#table_classes ⇒ Object
24 25 26 27 28 29 |
# File 'app/behaviors/ui/table_behavior.rb', line 24 def table_classes TailwindMerge::Merger.new.merge([ table_base_classes, @classes ].compact.join(" ")) end |
#table_html_attributes ⇒ Object
20 21 22 |
# File 'app/behaviors/ui/table_behavior.rb', line 20 def table_html_attributes {class: table_classes} end |