Class: GovukComponent::HeaderComponent

Inherits:
Base
  • Object
show all
Defined in:
app/components/govuk_component/header_component.rb

Defined Under Namespace

Classes: ProductName

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(classes: [], html_attributes: {}, homepage_url: config.default_header_homepage_url, container_classes: nil, full_width_border: false, header_html_attributes: {}) ⇒ HeaderComponent

Returns a new instance of HeaderComponent.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'app/components/govuk_component/header_component.rb', line 13

def initialize(classes: [],
               html_attributes: {},
               homepage_url: config.default_header_homepage_url,
               container_classes: nil,
               full_width_border: false,
               header_html_attributes: {})

  @homepage_url              = homepage_url
  @custom_container_classes  = container_classes
  @full_width_border         = full_width_border
  @header_html_attributes    = header_html_attributes

  super(classes:, html_attributes:)
end

Instance Attribute Details

#custom_container_classesObject (readonly)

Returns the value of attribute custom_container_classes.



7
8
9
# File 'app/components/govuk_component/header_component.rb', line 7

def custom_container_classes
  @custom_container_classes
end

#full_width_borderObject (readonly)

Returns the value of attribute full_width_border.



7
8
9
# File 'app/components/govuk_component/header_component.rb', line 7

def full_width_border
  @full_width_border
end

#header_html_attributesObject (readonly)

Returns the value of attribute header_html_attributes.



7
8
9
# File 'app/components/govuk_component/header_component.rb', line 7

def header_html_attributes
  @header_html_attributes
end

#homepage_urlObject (readonly)

Returns the value of attribute homepage_url.



7
8
9
# File 'app/components/govuk_component/header_component.rb', line 7

def homepage_url
  @homepage_url
end

#service_urlObject (readonly)

Returns the value of attribute service_url.



7
8
9
# File 'app/components/govuk_component/header_component.rb', line 7

def service_url
  @service_url
end