Class: Essence::EmptyStateComponent
- Inherits:
-
ApplicationComponent
- Object
- ViewComponent::Base
- ApplicationComponent
- Essence::EmptyStateComponent
- Defined in:
- app/components/essence/empty_state_component.rb
Constant Summary
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::InvalidValueError
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#headline ⇒ Object
readonly
Returns the value of attribute headline.
-
#html_options ⇒ Object
readonly
Returns the value of attribute html_options.
-
#image_path ⇒ Object
readonly
Returns the value of attribute image_path.
-
#link_text ⇒ Object
readonly
Returns the value of attribute link_text.
-
#link_url ⇒ Object
readonly
Returns the value of attribute link_url.
Instance Method Summary collapse
-
#initialize(image_path:, headline:, body:, link_text: nil, link_url: nil, **html_options) ⇒ EmptyStateComponent
constructor
A new instance of EmptyStateComponent.
Methods inherited from ApplicationComponent
#assets_path, assets_path, images_directory
Methods included from Utils
Methods included from FetchOrFallbackHelper
#fetch_or_fallback, #fetch_or_fallback_boolean, #integer_or_fallback
Constructor Details
#initialize(image_path:, headline:, body:, link_text: nil, link_url: nil, **html_options) ⇒ EmptyStateComponent
Returns a new instance of EmptyStateComponent.
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/components/essence/empty_state_component.rb', line 7 def initialize(image_path:, headline:, body:, link_text: nil, link_url: nil, **) @image_path = image_path @headline = headline @body = body @link_text = link_text @link_url = link_url @html_options = end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
5 6 7 |
# File 'app/components/essence/empty_state_component.rb', line 5 def body @body end |
#headline ⇒ Object (readonly)
Returns the value of attribute headline.
5 6 7 |
# File 'app/components/essence/empty_state_component.rb', line 5 def headline @headline end |
#html_options ⇒ Object (readonly)
Returns the value of attribute html_options.
5 6 7 |
# File 'app/components/essence/empty_state_component.rb', line 5 def @html_options end |
#image_path ⇒ Object (readonly)
Returns the value of attribute image_path.
5 6 7 |
# File 'app/components/essence/empty_state_component.rb', line 5 def image_path @image_path end |
#link_text ⇒ Object (readonly)
Returns the value of attribute link_text.
5 6 7 |
# File 'app/components/essence/empty_state_component.rb', line 5 def link_text @link_text end |
#link_url ⇒ Object (readonly)
Returns the value of attribute link_url.
5 6 7 |
# File 'app/components/essence/empty_state_component.rb', line 5 def link_url @link_url end |