Class: DesignSystem::Generic::CalloutComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- DesignSystem::Generic::CalloutComponent
- 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.
Direct Known Subclasses
DesignSystem::Govuk::CalloutComponent, Nhsuk::CalloutComponent
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
Instance Method Summary collapse
-
#initialize(label:, body:) ⇒ CalloutComponent
constructor
A new instance of CalloutComponent.
Methods included from Helpers::CssHelper
Methods included from BrandDerivable
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
#body ⇒ Object (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 |
#label ⇒ Object (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 |