Class: Matestack::Ui::Bootstrap::Layout::Row

Inherits:
BaseComponent
  • Object
show all
Defined in:
lib/matestack/ui/bootstrap/layout/row.rb

Instance Method Summary collapse

Instance Method Details

#responseObject



9
10
11
12
13
# File 'lib/matestack/ui/bootstrap/layout/row.rb', line 9

def response
  div options.merge(class: row_classes) do
    yield if block_given?
  end
end

#row_classesObject



15
16
17
18
19
20
21
22
23
# File 'lib/matestack/ui/bootstrap/layout/row.rb', line 15

def row_classes
  classes = ["row"]

  classes << "align-items-#{context.vertical}" if context.vertical.present?
  classes << "justify-content-#{context.horizontal}" if context.horizontal.present?
  classes << "#{context.bs_class}" if context.bs_class.present?

  classes.join(' ')
end