Class: UI::SheetFooterComponent

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

Overview

Sheet footer component (ViewComponent)

Examples:

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

Instance Method Summary collapse

Methods included from SheetFooterBehavior

#sheet_footer_base_classes, #sheet_footer_classes, #sheet_footer_html_attributes

Constructor Details

#initialize(classes: "") ⇒ SheetFooterComponent

Returns a new instance of SheetFooterComponent.

Parameters:

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

    additional CSS classes



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

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

Instance Method Details

#call ⇒ Object



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

def call
   :div, content, **sheet_footer_html_attributes
end