Class: DesignSystem::Nhsuk::Builders::Notification

Inherits:
Govuk::Builders::Notification show all
Defined in:
lib/design_system/nhsuk/builders/notification.rb

Overview

This class provides Nhsuk notifications html.

Instance Method Summary collapse

Methods inherited from Generic::Builders::Notification

#render_alert

Methods inherited from Generic::Builders::Base

#initialize

Methods included from Helpers::CssHelper

#css_class_options_merge

Methods included from Generic::Builders::Concerns::BrandDerivable

#brand

Constructor Details

This class inherits a constructor from DesignSystem::Generic::Builders::Base

Instance Method Details

#render_notice(msg) ⇒ Object



8
9
10
11
12
13
# File 'lib/design_system/nhsuk/builders/notification.rb', line 8

def render_notice(msg)
  content = (:p, sanitize(msg, tags: %w[b p br a], attributes: %w[href target]))
  (:div, class: "#{brand}-inset-text") do
    (:span, 'Information:', class: "#{brand}-u-visually-hidden") + content
  end
end