Class: Panda::Core::Admin::EmptyStateComponent
- Defined in:
- app/components/panda/core/admin/empty_state_component.rb
Overview
Empty state component for tables and lists.
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#icon ⇒ Object
readonly
Returns the value of attribute icon.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #default_attrs ⇒ Object
-
#initialize(title:, description: nil, icon: nil, **attrs) ⇒ EmptyStateComponent
constructor
A new instance of EmptyStateComponent.
Constructor Details
#initialize(title:, description: nil, icon: nil, **attrs) ⇒ EmptyStateComponent
Returns a new instance of EmptyStateComponent.
8 9 10 11 12 13 |
# File 'app/components/panda/core/admin/empty_state_component.rb', line 8 def initialize(title:, description: nil, icon: nil, **attrs) @title = title @description = description @icon = icon super(**attrs) end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
15 16 17 |
# File 'app/components/panda/core/admin/empty_state_component.rb', line 15 def description @description end |
#icon ⇒ Object (readonly)
Returns the value of attribute icon.
15 16 17 |
# File 'app/components/panda/core/admin/empty_state_component.rb', line 15 def icon @icon end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
15 16 17 |
# File 'app/components/panda/core/admin/empty_state_component.rb', line 15 def title @title end |
Instance Method Details
#default_attrs ⇒ Object
17 18 19 20 21 |
# File 'app/components/panda/core/admin/empty_state_component.rb', line 17 def default_attrs { class: "border-2 border-dashed border-gray-200 bg-white rounded-2xl px-6 py-10 text-center" } end |