Module: UI::TableFooterBehavior

Included in:
TableFooter, TableFooterComponent
Defined in:
app/behaviors/ui/table_footer_behavior.rb

Overview

FooterBehavior

Shared behavior for Table Footer (tfoot) component.

Instance Method Summary collapse

Instance Method Details



16
17
18
19
20
21
# File 'app/behaviors/ui/table_footer_behavior.rb', line 16

def footer_classes
  TailwindMerge::Merger.new.merge([
    footer_base_classes,
    @classes
  ].compact.join(" "))
end


12
13
14
# File 'app/behaviors/ui/table_footer_behavior.rb', line 12

def footer_html_attributes
  {class: footer_classes}
end


7
8
9
10
# File 'app/behaviors/ui/table_footer_behavior.rb', line 7

def render_footer(&content_block)
  all_attributes = footer_html_attributes.deep_merge(@attributes)
  (:tfoot, **all_attributes, &content_block)
end