Class: DesignSystem::Govuk::Builders::Panel
- Inherits:
-
DesignSystem::Generic::Builders::Panel
- Object
- DesignSystem::Generic::Builders::Base
- DesignSystem::Generic::Builders::Panel
- DesignSystem::Govuk::Builders::Panel
- Defined in:
- lib/design_system/govuk/builders/panel.rb
Overview
This generates html for rendering panel for Govuk
Instance Method Summary collapse
Methods inherited from DesignSystem::Generic::Builders::Base
Methods included from Helpers::CssHelper
Methods included from DesignSystem::Generic::Builders::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/govuk/builders/panel.rb', line 8 def render_panel(title, body) safe_buffer = ActiveSupport::SafeBuffer.new content_tag(:div, class: "#{brand}-panel #{brand}-panel--confirmation") 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 |