Class: UI::EmptyContent
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::EmptyContent
- Includes:
- EmptyContentBehavior
- Defined in:
- app/components/ui/empty_content.rb
Overview
EmptyContent - Phlex implementation
Displays the content of the empty state such as a button, input or a link.
Instance Method Summary collapse
-
#initialize(classes: "", **attributes) ⇒ EmptyContent
constructor
A new instance of EmptyContent.
- #view_template(&block) ⇒ Object
Methods included from EmptyContentBehavior
#empty_content_classes, #empty_content_html_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ EmptyContent
Returns a new instance of EmptyContent.
14 15 16 17 |
# File 'app/components/ui/empty_content.rb', line 14 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#view_template(&block) ⇒ Object
19 20 21 |
# File 'app/components/ui/empty_content.rb', line 19 def view_template(&block) div(**empty_content_html_attributes.merge(@attributes), &block) end |