Sha256: 5a579f1df8b23382590d9b049da5fbecd5cc40eb07388ab80e7060b80447a43f

Contents?: true

Size: 324 Bytes

Versions: 3

Compression:

Stored size: 324 Bytes

Contents

# frozen_string_literal: true

module Panda
  module CMS
    class GridComponent < ViewComponent::Base
      def initialize(columns: 1, spans: [1])
        @columns = "grid-cols-#{columns}"
        @colspans = []
        spans.each do |span|
          @colspans << "col-span-#{span}"
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
panda-cms-0.7.3 app/components/panda/cms/grid_component.rb
panda-cms-0.7.2 app/components/panda/cms/grid_component.rb
panda-cms-0.7.0 app/components/panda/cms/grid_component.rb