Class: PandaCms::GridComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- PandaCms::GridComponent
- Defined in:
- app/components/panda_cms/grid_component.rb
Instance Method Summary collapse
-
#initialize(columns: 1, spans: [1]) ⇒ GridComponent
constructor
A new instance of GridComponent.
Constructor Details
#initialize(columns: 1, spans: [1]) ⇒ GridComponent
Returns a new instance of GridComponent.
5 6 7 8 9 10 11 |
# File 'app/components/panda_cms/grid_component.rb', line 5 def initialize(columns: 1, spans: [1]) @columns = "grid-cols-#{columns}" @colspans = [] spans.each do |span| @colspans << "col-span-#{span}" end end |