Sha256: 657793d3b8effe52907523d84a4ff80f291d0217ea68f2eb096505975e037b08

Contents?: true

Size: 976 Bytes

Versions: 18

Compression:

Stored size: 976 Bytes

Contents

# frozen_string_literal: true

require_relative '../../components/govuk/warning_text'

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

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

        def govuk_warning_text(text = nil, **options, &block)
          Components::GovUK::WarningText.new(context: self, text: text, **options).render(&block)
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

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