Sha256: c128d50daed8b13be35612765c300125ea8e17e5a3e5806d7c0c757d3102b633

Contents?: true

Size: 896 Bytes

Versions: 1

Compression:

Stored size: 896 Bytes

Contents

# frozen_string_literal: true

require_relative '../../components/govuk/inset_text'

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

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

      def govuk_inset_text(text = nil, **options, &block)
        Components::GovUK::InsetText.new(context: self, text: text, **options).render(&block)
      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/inset_text.rb