Sha256: c20108c08fc84c2225389078c3d9c81ce41ce2f18015b478f4a48b2e1d8fbe06

Contents?: true

Size: 928 Bytes

Versions: 20

Compression:

Stored size: 928 Bytes

Contents

# frozen_string_literal: true

require_relative '../../components/govuk/field/input/file_upload'

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

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

        def govuk_file_upload(attribute, **options)
          Components::GovUK::Field::Input::FileUpload.new(context: self, attribute: attribute, **options).render
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
ccs-frontend_helpers-2.1.0 lib/ccs/frontend_helpers/govuk_frontend/file_upload.rb
ccs-frontend_helpers-2.0.0 lib/ccs/frontend_helpers/govuk_frontend/file_upload.rb
ccs-frontend_helpers-1.2.0 lib/ccs/frontend_helpers/govuk_frontend/file_upload.rb
ccs-frontend_helpers-1.1.2 lib/ccs/frontend_helpers/govuk_frontend/file_upload.rb
ccs-frontend_helpers-1.1.1 lib/ccs/frontend_helpers/govuk_frontend/file_upload.rb
ccs-frontend_helpers-1.1.0 lib/ccs/frontend_helpers/govuk_frontend/file_upload.rb
ccs-frontend_helpers-1.1.0.beta0 lib/ccs/frontend_helpers/govuk_frontend/file_upload.rb
ccs-frontend_helpers-1.0.0 lib/ccs/frontend_helpers/govuk_frontend/file_upload.rb
ccs-frontend_helpers-0.5.0.beta1 lib/ccs/frontend_helpers/govuk_frontend/file_upload.rb
ccs-frontend_helpers-0.5.0.beta0 lib/ccs/frontend_helpers/govuk_frontend/file_upload.rb
ccs-frontend_helpers-0.3.0 lib/ccs/frontend_helpers/govuk_frontend/file_upload.rb
ccs-frontend_helpers-0.2.0 lib/ccs/frontend_helpers/govuk_frontend/file_upload.rb
ccs-frontend_helpers-0.1.2 lib/ccs/frontend_helpers/govuk_frontend/file_upload.rb
ccs-frontend_helpers-0.1.1 lib/ccs/frontend_helpers/govuk_frontend/file_upload.rb
ccs-frontend_helpers-0.1.1.rc.1 lib/ccs/frontend_helpers/govuk_frontend/file_upload.rb
ccs-frontend_helpers-0.1.0.rc.7 lib/ccs/frontend_helpers/govuk_frontend/file_upload.rb
ccs-frontend_helpers-0.1.0.rc.6 lib/ccs/frontend_helpers/govuk_frontend/file_upload.rb
ccs-frontend_helpers-0.1.0.rc.5 lib/ccs/frontend_helpers/govuk_frontend/file_upload.rb
ccs-frontend_helpers-0.1.0.rc.4 lib/ccs/frontend_helpers/govuk_frontend/file_upload.rb
ccs-frontend_helpers-0.1.0.rc.3 lib/ccs/frontend_helpers/govuk_frontend/file_upload.rb