Class: DesignSystem::Generic::Builders::Panel
- Defined in:
- lib/design_system/generic/builders/panel.rb
Overview
This generates html for rendering panel to display important information when a transaction has been completed.
Direct Known Subclasses
DesignSystem::Govuk::Builders::Panel, Nhsuk::Builders::Panel
Instance Method Summary collapse
Methods inherited from Base
Methods included from Helpers::CssHelper
Methods included from Concerns::BrandDerivable
Constructor Details
This class inherits a constructor from DesignSystem::Generic::Builders::Base
Instance Method Details
#render_panel(title, body) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/design_system/generic/builders/panel.rb', line 8 def render_panel(title, body) safe_buffer = ActiveSupport::SafeBuffer.new content_tag(:div, class: "#{brand}-panel") do safe_buffer.concat(content_tag(:h1, title, class: "#{brand}-panel__title")) safe_buffer.concat(content_tag(:div, body, class: "#{brand}-panel__body")) end end |