Module: UI::SheetFooterBehavior

Included in:
SheetFooter, SheetFooterComponent
Defined in:
app/behaviors/ui/sheet_footer_behavior.rb

Overview

Shared behavior for Sheet Footer component

Instance Method Summary collapse

Instance Method Details

Base classes applied to sheet footer Different from Dialog: uses mt-auto and p-4



24
25
26
# File 'app/behaviors/ui/sheet_footer_behavior.rb', line 24

def sheet_footer_base_classes
  "mt-auto flex flex-col gap-2 p-4"
end

Returns combined CSS classes for the sheet footer



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

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

Returns HTML attributes for the sheet footer



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

def sheet_footer_html_attributes
  {
    class: sheet_footer_classes
  }
end