Class: Railsboot::Modal::FooterComponent
- Inherits:
-
Component
- Object
- Component
- Railsboot::Modal::FooterComponent
- Defined in:
- app/components/railsboot/modal/footer_component.rb
Overview
ViewComponent: renders the footer block.
Instance Method Summary collapse
-
#call ⇒ String
Renders the modal footer as a
divcontaining the block content. -
#initialize(**html_attributes) ⇒ FooterComponent
constructor
A new instance of FooterComponent.
Constructor Details
#initialize(**html_attributes) ⇒ FooterComponent
Returns a new instance of FooterComponent.
6 7 8 9 10 11 12 13 |
# File 'app/components/railsboot/modal/footer_component.rb', line 6 def initialize(**html_attributes) @html_attributes = html_attributes @html_attributes[:class] = class_names( "modal-footer", html_attributes.delete(:class) ) end |
Instance Method Details
#call ⇒ String
Renders the modal footer as a div containing the block content.
17 18 19 |
# File 'app/components/railsboot/modal/footer_component.rb', line 17 def call render(Railsboot::BaseComponent.new(tag: "div", **@html_attributes)) { content } end |