Class: DesignSystem::Nhsuk::Builders::Notification
- Inherits:
-
Govuk::Builders::Notification
- Object
- Generic::Builders::Base
- Generic::Builders::Notification
- Govuk::Builders::Notification
- DesignSystem::Nhsuk::Builders::Notification
- 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
Methods inherited from Generic::Builders::Base
Methods included from Helpers::CssHelper
Methods included from Generic::Builders::Concerns::BrandDerivable
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 = content_tag(:p, sanitize(msg, tags: %w[b p br a], attributes: %w[href target])) content_tag(:div, class: "#{brand}-inset-text") do content_tag(:span, 'Information:', class: "#{brand}-u-visually-hidden") + content end end |