Class: Spark::MediaBlock

Inherits:
Component::Base show all
Defined in:
app/components/spark/media_block.rb

Constant Summary collapse

LAYOUT =
%i[default reverse]
ALIGN =
%i[top middle bottom]
GUTTER =
%i[small base medium large xl].freeze

Instance Method Summary collapse

Methods inherited from Component::Base

#selector, #to_s, #unique_id

Constructor Details

#initializeMediaBlock

Returns a new instance of MediaBlock.



17
18
19
20
21
22
23
24
25
# File 'app/components/spark/media_block.rb', line 17

def initialize(*)
  super

  classname.add("spark-media-block")
  classname.add("layout-#{@layout}") if @layout
  classname.add("align-#{@align}") if @align
  classname.add("gutter-#{@gutter}") if @gutter
  classname.add("expand") if @expand
end