Class: DesignSystem::Generic::PanelComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/design_system/generic/panel_component.rb

Overview

Confirmation/transaction panel rendered by ds_panel.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helpers::CssHelper

#css_class_options_merge

Methods included from BrandDerivable

#brand

Constructor Details

#initialize(title:, body:) ⇒ PanelComponent

Returns a new instance of PanelComponent.



5
6
7
8
9
# File 'app/components/design_system/generic/panel_component.rb', line 5

def initialize(title:, body:)
  super()
  @title = title
  @body = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



11
12
13
# File 'app/components/design_system/generic/panel_component.rb', line 11

def body
  @body
end

#titleObject (readonly)

Returns the value of attribute title.



11
12
13
# File 'app/components/design_system/generic/panel_component.rb', line 11

def title
  @title
end

Instance Method Details

#panel_classesObject



13
14
15
# File 'app/components/design_system/generic/panel_component.rb', line 13

def panel_classes
  ["#{brand}-panel"]
end