Sha256: ad2dc40f02f2411c8e789052021c054eb93a01769d12eda19f9c9f878947500b

Contents?: true

Size: 922 Bytes

Versions: 1

Compression:

Stored size: 922 Bytes

Contents

# frozen_string_literal: true

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

module CCS
  module FrontendHelpers::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

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/warning_text.rb