Module: UI::TableCaptionBehavior
- Included in:
- TableCaption, TableCaptionComponent
- Defined in:
- app/behaviors/ui/table_caption_behavior.rb
Overview
UI::TableCaptionBehavior
Instance Method Summary collapse
- #caption_classes ⇒ Object
- #caption_html_attributes ⇒ Object
- #render_caption(&content_block) ⇒ Object
Instance Method Details
#caption_classes ⇒ Object
22 23 24 25 26 27 |
# File 'app/behaviors/ui/table_caption_behavior.rb', line 22 def caption_classes TailwindMerge::Merger.new.merge([ caption_base_classes, @classes ].compact.join(" ")) end |
#caption_html_attributes ⇒ Object
18 19 20 |
# File 'app/behaviors/ui/table_caption_behavior.rb', line 18 def caption_html_attributes {class: caption_classes} end |
#render_caption(&content_block) ⇒ Object
13 14 15 16 |
# File 'app/behaviors/ui/table_caption_behavior.rb', line 13 def render_caption(&content_block) all_attributes = caption_html_attributes.deep_merge(@attributes) content_tag(:caption, **all_attributes, &content_block) end |