Class: UI::AlertDialogFooter

Inherits:
Phlex::HTML
  • Object
show all
Includes:
AlertDialogFooterBehavior
Defined in:
app/components/ui/alert_dialog_footer.rb

Overview

Footer - Phlex implementation

Footer section with action buttons for the alert dialog. Uses AlertDialogFooterBehavior module for shared styling logic.

Examples:

Basic usage

render UI::Footer.new do
  render UI::Cancel.new { "Cancel" }
  render UI::Action.new { "Continue" }
end

Instance Method Summary collapse

Methods included from AlertDialogFooterBehavior

#alert_dialog_footer_base_classes, #alert_dialog_footer_classes, #alert_dialog_footer_html_attributes

Constructor Details

#initialize(classes: "", **attributes) ⇒ AlertDialogFooter

Returns a new instance of AlertDialogFooter.

Parameters:

  • classes (String) (defaults to: "")

    Additional CSS classes to merge

  • attributes (Hash)

    Additional HTML attributes



18
19
20
21
# File 'app/components/ui/alert_dialog_footer.rb', line 18

def initialize(classes: "", **attributes)
  @classes = classes
  @attributes = attributes
end

Instance Method Details

#view_template(&block) ⇒ Object



23
24
25
26
27
# File 'app/components/ui/alert_dialog_footer.rb', line 23

def view_template(&block)
  div(**alert_dialog_footer_html_attributes) do
    yield if block_given?
  end
end