Module: UI::DialogFooterBehavior

Included in:
DialogFooter, DialogFooterComponent
Defined in:
app/behaviors/ui/dialog_footer_behavior.rb

Overview

Shared behavior for Dialog Footer component

Instance Method Summary collapse

Instance Method Details

Base classes applied to dialog footer



23
24
25
# File 'app/behaviors/ui/dialog_footer_behavior.rb', line 23

def dialog_footer_base_classes
  "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end"
end

Returns combined CSS classes for the dialog footer



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

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

Returns HTML attributes for the dialog footer



8
9
10
11
12
# File 'app/behaviors/ui/dialog_footer_behavior.rb', line 8

def dialog_footer_html_attributes
  {
    class: dialog_footer_classes
  }
end