Class: SolidusAdmin::UI::ThumbnailWithCaption::Component

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/solidus_admin/ui/thumbnail_with_caption/component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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 = caption
  @detail = detail
end

Instance Attribute Details

#captionObject (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
  @caption
end

#detailObject (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

#iconObject (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_thumbnailObject



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