Sha256: a87af1b0e233232bdc95764a0cf4e49b623809290d6dd9eb5df0eae8d97b09fc

Contents?: true

Size: 841 Bytes

Versions: 4

Compression:

Stored size: 841 Bytes

Contents

# frozen_string_literal: true

require_relative '../../components/govuk/table'

module CCS
  module FrontendHelpers
    module GovUKFrontend
      # = GOV.UK Table
      #
      # This helper is used for generating the table component from the
      # {https://design-system.service.gov.uk/components/table GDS - Components - Table}

      module Table
        # Generates the HTML for the GOV.UK Table component
        #
        # @param (see CCS::Components::GovUK::Table#initialize)
        #
        # @option (see CCS::Components::GovUK::Table#initialize)
        #
        # @return (see CCS::Components::GovUK::Table#render)

        def govuk_table(rows, head_cells = nil, **options)
          Components::GovUK::Table.new(context: self, rows: rows, head_cells: head_cells, **options).render
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ccs-frontend_helpers-0.1.0.rc.6 lib/ccs/frontend_helpers/govuk_frontend/table.rb
ccs-frontend_helpers-0.1.0.rc.5 lib/ccs/frontend_helpers/govuk_frontend/table.rb
ccs-frontend_helpers-0.1.0.rc.4 lib/ccs/frontend_helpers/govuk_frontend/table.rb
ccs-frontend_helpers-0.1.0.rc.3 lib/ccs/frontend_helpers/govuk_frontend/table.rb