Class: DesignSystem::Generic::CalloutComponent

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

Overview

NHS-style warning callout: the GOV.UK brand renders a warning-text variant via its own subclass and template.

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(label:, body:) ⇒ CalloutComponent

Returns a new instance of CalloutComponent.



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

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

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



12
13
14
# File 'app/components/design_system/generic/callout_component.rb', line 12

def body
  @body
end

#labelObject (readonly)

Returns the value of attribute label.



12
13
14
# File 'app/components/design_system/generic/callout_component.rb', line 12

def label
  @label
end