Class: SolidusAdmin::UI::ThumbnailWithCaption::Component
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- SolidusAdmin::UI::ThumbnailWithCaption::Component
- Defined in:
- app/components/solidus_admin/ui/thumbnail_with_caption/component.rb
Instance Attribute Summary collapse
-
#caption ⇒ Object
readonly
Returns the value of attribute caption.
-
#detail ⇒ Object
readonly
Returns the value of attribute detail.
-
#icon ⇒ Object
readonly
Returns the value of attribute icon.
Instance Method Summary collapse
- #icon_thumbnail ⇒ Object
-
#initialize(icon: "question-line", caption: "", detail: nil) ⇒ Component
constructor
A new instance of Component.
Constructor Details
#initialize(icon: "question-line", caption: "", detail: nil) ⇒ Component
Returns a new instance of Component.
6 7 8 9 10 |
# File 'app/components/solidus_admin/ui/thumbnail_with_caption/component.rb', line 6 def initialize(icon: "question-line", caption: "", detail: nil) @icon = icon @caption = @detail = detail end |
Instance Attribute Details
#caption ⇒ Object (readonly)
Returns the value of attribute caption.
4 5 6 |
# File 'app/components/solidus_admin/ui/thumbnail_with_caption/component.rb', line 4 def @caption end |
#detail ⇒ Object (readonly)
Returns the value of attribute detail.
4 5 6 |
# File 'app/components/solidus_admin/ui/thumbnail_with_caption/component.rb', line 4 def detail @detail end |
#icon ⇒ Object (readonly)
Returns the value of attribute icon.
4 5 6 |
# File 'app/components/solidus_admin/ui/thumbnail_with_caption/component.rb', line 4 def icon @icon end |
Instance Method Details
#icon_thumbnail ⇒ Object
12 13 14 |
# File 'app/components/solidus_admin/ui/thumbnail_with_caption/component.rb', line 12 def icon_thumbnail render component("ui/thumbnail").new(icon:) end |