Sha256: 5741ecc94e8e1677caef398099cb17f99de648bf1413bacbe8b986121b466c97

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 KB

Contents

# frozen_string_literal: true

require_relative '../../components/govuk/notification_banner'

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

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

      def govuk_notification_banner(text = nil, success_banner = nil, **options, &block)
        Components::GovUK::NotificationBanner.new(context: self, text: text, success_banner: success_banner, **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/notification_banner.rb