Class: GovukComponent::HeaderComponent
- Defined in:
- app/components/govuk_component/header_component.rb
Defined Under Namespace
Classes: NavigationItem, ProductName
Instance Attribute Summary collapse
-
#crown ⇒ Object
readonly
Returns the value of attribute crown.
-
#crown_fallback_image_path ⇒ Object
readonly
Returns the value of attribute crown_fallback_image_path.
-
#custom_container_classes ⇒ Object
readonly
Returns the value of attribute custom_container_classes.
-
#custom_navigation_classes ⇒ Object
readonly
Returns the value of attribute custom_navigation_classes.
-
#homepage_url ⇒ Object
readonly
Returns the value of attribute homepage_url.
-
#logotype ⇒ Object
readonly
Returns the value of attribute logotype.
-
#menu_button_label ⇒ Object
readonly
Returns the value of attribute menu_button_label.
-
#navigation_label ⇒ Object
readonly
Returns the value of attribute navigation_label.
-
#service_name ⇒ Object
readonly
Returns the value of attribute service_name.
-
#service_url ⇒ Object
readonly
Returns the value of attribute service_url.
Attributes inherited from Base
Attributes included from Traits::CustomHtmlAttributes
Instance Method Summary collapse
-
#initialize(classes: [], html_attributes: {}, logotype: 'GOV.UK', crown: true, crown_fallback_image_path: nil, homepage_url: '/', menu_button_label: 'Show or hide navigation menu', navigation_classes: [], navigation_label: 'Navigation menu', service_name: nil, service_url: '/', container_classes: nil) ⇒ HeaderComponent
constructor
A new instance of HeaderComponent.
Methods included from Traits::CustomClasses
Methods included from Govuk::Components::Helpers::CssUtilities
Constructor Details
#initialize(classes: [], html_attributes: {}, logotype: 'GOV.UK', crown: true, crown_fallback_image_path: nil, homepage_url: '/', menu_button_label: 'Show or hide navigation menu', navigation_classes: [], navigation_label: 'Navigation menu', service_name: nil, service_url: '/', container_classes: nil) ⇒ HeaderComponent
Returns a new instance of HeaderComponent.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'app/components/govuk_component/header_component.rb', line 17 def initialize(classes: [], html_attributes: {}, logotype: 'GOV.UK', crown: true, crown_fallback_image_path: nil, homepage_url: '/', menu_button_label: 'Show or hide navigation menu', navigation_classes: [], navigation_label: 'Navigation menu', service_name: nil, service_url: '/', container_classes: nil) super(classes: classes, html_attributes: html_attributes) @logotype = logotype @crown = crown @crown_fallback_image_path = crown_fallback_image_path @homepage_url = homepage_url @service_name = service_name @service_url = service_url = = = @custom_container_classes = container_classes end |
Instance Attribute Details
#crown ⇒ Object (readonly)
Returns the value of attribute crown.
6 7 8 |
# File 'app/components/govuk_component/header_component.rb', line 6 def crown @crown end |
#crown_fallback_image_path ⇒ Object (readonly)
Returns the value of attribute crown_fallback_image_path.
6 7 8 |
# File 'app/components/govuk_component/header_component.rb', line 6 def crown_fallback_image_path @crown_fallback_image_path end |
#custom_container_classes ⇒ Object (readonly)
Returns the value of attribute custom_container_classes.
6 7 8 |
# File 'app/components/govuk_component/header_component.rb', line 6 def custom_container_classes @custom_container_classes end |
#custom_navigation_classes ⇒ Object (readonly)
Returns the value of attribute custom_navigation_classes.
6 7 8 |
# File 'app/components/govuk_component/header_component.rb', line 6 def end |
#homepage_url ⇒ Object (readonly)
Returns the value of attribute homepage_url.
6 7 8 |
# File 'app/components/govuk_component/header_component.rb', line 6 def homepage_url @homepage_url end |
#logotype ⇒ Object (readonly)
Returns the value of attribute logotype.
6 7 8 |
# File 'app/components/govuk_component/header_component.rb', line 6 def logotype @logotype end |
#menu_button_label ⇒ Object (readonly)
Returns the value of attribute menu_button_label.
6 7 8 |
# File 'app/components/govuk_component/header_component.rb', line 6 def end |
#navigation_label ⇒ Object (readonly)
Returns the value of attribute navigation_label.
6 7 8 |
# File 'app/components/govuk_component/header_component.rb', line 6 def end |
#service_name ⇒ Object (readonly)
Returns the value of attribute service_name.
6 7 8 |
# File 'app/components/govuk_component/header_component.rb', line 6 def service_name @service_name end |
#service_url ⇒ Object (readonly)
Returns the value of attribute service_url.
6 7 8 |
# File 'app/components/govuk_component/header_component.rb', line 6 def service_url @service_url end |