Class: DesignSystem::Generic::Builders::Panel

Inherits:
Base
  • Object
show all
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.

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from Helpers::CssHelper

#css_class_options_merge

Methods included from Concerns::BrandDerivable

#brand

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
  (:div, class: "#{brand}-panel") do
    safe_buffer.concat((:h1, title, class: "#{brand}-panel__title"))
    safe_buffer.concat((:div, body, class: "#{brand}-panel__body"))
  end
end