Sha256: 4f0c2aa80fcc6cff7edc6e820e68e9403710a4d417049262f0704c3605e7e393

Contents?: true

Size: 1.09 KB

Versions: 18

Compression:

Stored size: 1.09 KB

Contents

# frozen_string_literal: true

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

module CCS
  module FrontendHelpers
    module 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
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/notification_banner.rb
ccs-frontend_helpers-1.1.2 lib/ccs/frontend_helpers/govuk_frontend/notification_banner.rb
ccs-frontend_helpers-1.1.1 lib/ccs/frontend_helpers/govuk_frontend/notification_banner.rb
ccs-frontend_helpers-1.1.0 lib/ccs/frontend_helpers/govuk_frontend/notification_banner.rb
ccs-frontend_helpers-1.1.0.beta0 lib/ccs/frontend_helpers/govuk_frontend/notification_banner.rb
ccs-frontend_helpers-1.0.0 lib/ccs/frontend_helpers/govuk_frontend/notification_banner.rb
ccs-frontend_helpers-0.5.0.beta1 lib/ccs/frontend_helpers/govuk_frontend/notification_banner.rb
ccs-frontend_helpers-0.5.0.beta0 lib/ccs/frontend_helpers/govuk_frontend/notification_banner.rb
ccs-frontend_helpers-0.3.0 lib/ccs/frontend_helpers/govuk_frontend/notification_banner.rb
ccs-frontend_helpers-0.2.0 lib/ccs/frontend_helpers/govuk_frontend/notification_banner.rb
ccs-frontend_helpers-0.1.2 lib/ccs/frontend_helpers/govuk_frontend/notification_banner.rb
ccs-frontend_helpers-0.1.1 lib/ccs/frontend_helpers/govuk_frontend/notification_banner.rb
ccs-frontend_helpers-0.1.1.rc.1 lib/ccs/frontend_helpers/govuk_frontend/notification_banner.rb
ccs-frontend_helpers-0.1.0.rc.7 lib/ccs/frontend_helpers/govuk_frontend/notification_banner.rb
ccs-frontend_helpers-0.1.0.rc.6 lib/ccs/frontend_helpers/govuk_frontend/notification_banner.rb
ccs-frontend_helpers-0.1.0.rc.5 lib/ccs/frontend_helpers/govuk_frontend/notification_banner.rb
ccs-frontend_helpers-0.1.0.rc.4 lib/ccs/frontend_helpers/govuk_frontend/notification_banner.rb
ccs-frontend_helpers-0.1.0.rc.3 lib/ccs/frontend_helpers/govuk_frontend/notification_banner.rb