Class: UI::DialogFooterComponent

Inherits:
ViewComponent::Base
  • Object
show all
Includes:
DialogFooterBehavior
Defined in:
app/view_components/ui/dialog_footer_component.rb

Overview

Dialog footer component (ViewComponent) Footer section for the dialog

Examples:

<%= render UI::FooterComponent.new do %>
  <%= render UI::CloseComponent.new { "Close" } %>
<% end %>

Instance Method Summary collapse

Methods included from DialogFooterBehavior

#dialog_footer_base_classes, #dialog_footer_classes, #dialog_footer_html_attributes

Constructor Details

#initialize(classes: "") ⇒ DialogFooterComponent

Returns a new instance of DialogFooterComponent.

Parameters:

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

    additional CSS classes



14
15
16
# File 'app/view_components/ui/dialog_footer_component.rb', line 14

def initialize(classes: "")
  @classes = classes
end

Instance Method Details

#callObject



18
19
20
# File 'app/view_components/ui/dialog_footer_component.rb', line 18

def call
   :div, content, **dialog_footer_html_attributes
end