Sha256: 0b8d653868060c10f2916ffee210e87034d4746a9422538c15d512e5e1a77542

Contents?: true

Size: 791 Bytes

Versions: 1

Compression:

Stored size: 791 Bytes

Contents

# frozen_string_literal: true

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

module CCS
  module FrontendHelpers::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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ccs-frontend_helpers-0.1.0.rc.2 lib/ccs/frontend_helpers/govuk_frontend/table.rb