Sha256: e482096a88b2b302740cb65f5dccb49e218e31134a9e475c24940b3b2d7c5f87

Contents?: true

Size: 940 Bytes

Versions: 2

Compression:

Stored size: 940 Bytes

Contents

# frozen_string_literal: true

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

module CCS
  module FrontendHelpers
    module 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, &)
          Components::GovUK::InsetText.new(context: self, text: text, **options).render(&)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ccs-frontend_helpers-2.1.0 lib/ccs/frontend_helpers/govuk_frontend/inset_text.rb
ccs-frontend_helpers-2.0.0 lib/ccs/frontend_helpers/govuk_frontend/inset_text.rb