Class: UI::Empty
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::Empty
- Includes:
- EmptyBehavior
- Defined in:
- app/components/ui/empty.rb
Overview
Empty - Phlex implementation
Displays empty states in applications with customizable media, titles, descriptions, and actions.
Instance Method Summary collapse
-
#initialize(classes: "", **attributes) ⇒ Empty
constructor
A new instance of Empty.
- #view_template(&block) ⇒ Object
Methods included from EmptyBehavior
#empty_classes, #empty_html_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ Empty
Returns a new instance of Empty.
17 18 19 20 |
# File 'app/components/ui/empty.rb', line 17 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#view_template(&block) ⇒ Object
22 23 24 |
# File 'app/components/ui/empty.rb', line 22 def view_template(&block) div(**empty_html_attributes.merge(@attributes), &block) end |