Class: Blacklight::TopNavbarComponent

Inherits:
Component
  • Object
show all
Defined in:
app/components/blacklight/top_navbar_component.rb

Constant Summary

Constants inherited from Component

Component::EXCLUDE_VARIABLES

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Component

compiler, config, #inspect

Constructor Details

#initialize(blacklight_config:) ⇒ TopNavbarComponent

Returns a new instance of TopNavbarComponent.



5
6
7
# File 'app/components/blacklight/top_navbar_component.rb', line 5

def initialize(blacklight_config:)
  @blacklight_config = blacklight_config
end

Instance Attribute Details

#blacklight_configObject (readonly)

Returns the value of attribute blacklight_config.



9
10
11
# File 'app/components/blacklight/top_navbar_component.rb', line 9

def blacklight_config
  @blacklight_config
end

Instance Method Details



13
14
15
# File 'app/components/blacklight/top_navbar_component.rb', line 13

def logo_link(title: application_name)
  link_to title, blacklight_config.logo_link, class: 'mb-0 navbar-brand navbar-logo'
end