Class: Grid::Columns::ColumnsComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/grid/columns/columns_component.rb

Constant Summary collapse

BREAK_POINTS =
[:xs, :sm, :md, :lg, :xl, :xxl]

Instance Method Summary collapse

Constructor Details

#initialize(**options) ⇒ ColumnsComponent

Returns a new instance of ColumnsComponent.



8
9
10
11
12
13
# File 'app/components/grid/columns/columns_component.rb', line 8

def initialize(**options)
  @columns = options[:col]
  @offsets = options[:offset]
  @classes = options[:classes]
  @styles = options[:styles]
end

Instance Method Details

#callObject



15
16
17
18
19
20
21
# File 'app/components/grid/columns/columns_component.rb', line 15

def call
  (:div,
    content,
    class: column_class_builder,
    style: @styles,
  )
end