Class: GovukComponent::Warning
- Defined in:
- app/components/govuk_component/warning.rb
Instance Attribute Summary
Attributes included from Traits::CustomHtmlAttributes
Instance Method Summary collapse
-
#initialize(text:, icon_fallback_text: 'Warning', classes: [], html_attributes: {}) ⇒ Warning
constructor
A new instance of Warning.
Methods inherited from Base
Methods included from Traits::CustomClasses
Constructor Details
#initialize(text:, icon_fallback_text: 'Warning', classes: [], html_attributes: {}) ⇒ Warning
Returns a new instance of Warning.
2 3 4 5 6 7 |
# File 'app/components/govuk_component/warning.rb', line 2 def initialize(text:, icon_fallback_text: 'Warning', classes: [], html_attributes: {}) super(classes: classes, html_attributes: html_attributes) @text = text @icon_fallback_text = icon_fallback_text end |