Sha256: b8a81e43641858ed0be669f1e82ba29971f4b7dc64a2e50d03900e43e75386df

Contents?: true

Size: 847 Bytes

Versions: 1

Compression:

Stored size: 847 Bytes

Contents

# frozen_string_literal: true

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

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

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

      def govuk_input(attribute, **options)
        Components::GovUK::Field::Input::TextInput.new(context: self, attribute: attribute, **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/input.rb