Class: Spark::MediaBlock
- Inherits:
-
Component::Base
- Object
- ActionView::Component::Base
- Component::Base
- Spark::MediaBlock
- 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
-
#initialize ⇒ MediaBlock
constructor
A new instance of MediaBlock.
Methods inherited from Component::Base
Constructor Details
#initialize ⇒ MediaBlock
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 |