Class: UI::ItemMediaComponent

Inherits:
ViewComponent::Base
  • Object
show all
Includes:
ItemMediaBehavior
Defined in:
app/view_components/ui/item_media_component.rb

Instance Method Summary collapse

Methods included from ItemMediaBehavior

#item_media_classes, #item_media_html_attributes

Constructor Details

#initialize(variant: "default", classes: "", **attributes) ⇒ ItemMediaComponent

Returns a new instance of ItemMediaComponent.



6
7
8
9
10
# File 'app/view_components/ui/item_media_component.rb', line 6

def initialize(variant: "default", classes: "", **attributes)
  @variant = variant
  @classes = classes
  @attributes = attributes
end

Instance Method Details

#callObject



12
13
14
# File 'app/view_components/ui/item_media_component.rb', line 12

def call
   :div, content, **item_media_html_attributes
end