Class: GovukComponent::NotificationBanner::Heading
- Inherits:
-
ViewComponent::Slot
- Object
- ViewComponent::Slot
- GovukComponent::NotificationBanner::Heading
- Defined in:
- app/components/govuk_component/notification_banner.rb
Instance Attribute Summary collapse
-
#link_target ⇒ Object
Returns the value of attribute link_target.
-
#link_text ⇒ Object
Returns the value of attribute link_text.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
- #default_classes ⇒ Object
-
#initialize(text:, link_text: nil, link_target: nil) ⇒ Heading
constructor
A new instance of Heading.
Constructor Details
#initialize(text:, link_text: nil, link_target: nil) ⇒ Heading
Returns a new instance of Heading.
39 40 41 42 43 |
# File 'app/components/govuk_component/notification_banner.rb', line 39 def initialize(text:, link_text: nil, link_target: nil) @text = text @link_text = link_text @link_target = link_target end |
Instance Attribute Details
#link_target ⇒ Object
Returns the value of attribute link_target.
37 38 39 |
# File 'app/components/govuk_component/notification_banner.rb', line 37 def link_target @link_target end |
#link_text ⇒ Object
Returns the value of attribute link_text.
37 38 39 |
# File 'app/components/govuk_component/notification_banner.rb', line 37 def link_text @link_text end |
#text ⇒ Object
Returns the value of attribute text.
37 38 39 |
# File 'app/components/govuk_component/notification_banner.rb', line 37 def text @text end |
Instance Method Details
#default_classes ⇒ Object
45 46 47 |
# File 'app/components/govuk_component/notification_banner.rb', line 45 def default_classes %w(govuk-notification-banner__heading) end |