Class: Avo::EmptyStateComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Avo::EmptyStateComponent
- Defined in:
- app/components/avo/empty_state_component.rb
Instance Attribute Summary collapse
-
#add_background ⇒ Object
readonly
Returns the value of attribute add_background.
-
#by_association ⇒ Object
readonly
Returns the value of attribute by_association.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#view_type ⇒ Object
readonly
Returns the value of attribute view_type.
Instance Method Summary collapse
-
#initialize(message: nil, view_type: :table, add_background: false, by_association: false) ⇒ EmptyStateComponent
constructor
A new instance of EmptyStateComponent.
- #text ⇒ Object
- #view_type_svg ⇒ Object
Constructor Details
#initialize(message: nil, view_type: :table, add_background: false, by_association: false) ⇒ EmptyStateComponent
Returns a new instance of EmptyStateComponent.
6 7 8 9 10 11 |
# File 'app/components/avo/empty_state_component.rb', line 6 def initialize(message: nil, view_type: :table, add_background: false, by_association: false) @message = @view_type = view_type @add_background = add_background @by_association = by_association end |
Instance Attribute Details
#add_background ⇒ Object (readonly)
Returns the value of attribute add_background.
4 5 6 |
# File 'app/components/avo/empty_state_component.rb', line 4 def add_background @add_background end |
#by_association ⇒ Object (readonly)
Returns the value of attribute by_association.
4 5 6 |
# File 'app/components/avo/empty_state_component.rb', line 4 def by_association @by_association end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
4 5 6 |
# File 'app/components/avo/empty_state_component.rb', line 4 def @message end |
#view_type ⇒ Object (readonly)
Returns the value of attribute view_type.
4 5 6 |
# File 'app/components/avo/empty_state_component.rb', line 4 def view_type @view_type end |
Instance Method Details
#text ⇒ Object
13 14 15 |
# File 'app/components/avo/empty_state_component.rb', line 13 def text || end |
#view_type_svg ⇒ Object
17 18 19 |
# File 'app/components/avo/empty_state_component.rb', line 17 def view_type_svg "#{view_type}-empty-state" end |