Class: Blacklight::TopNavbarComponent
- Defined in:
 - app/components/blacklight/top_navbar_component.rb
 
Constant Summary
Constants inherited from Component
Instance Attribute Summary collapse
- 
  
    
      #blacklight_config  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute blacklight_config.
 
Instance Method Summary collapse
- #aria_label ⇒ Object
 - 
  
    
      #initialize(blacklight_config:)  ⇒ TopNavbarComponent 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of TopNavbarComponent.
 - #logo_link(title: application_name) ⇒ Object
 
Methods inherited from Component
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_config ⇒ Object (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
#aria_label ⇒ Object
      13 14 15  | 
    
      # File 'app/components/blacklight/top_navbar_component.rb', line 13 def aria_label t('blacklight.top_navbar.aria.container_label') end  | 
  
#logo_link(title: application_name) ⇒ Object
      17 18 19  | 
    
      # File 'app/components/blacklight/top_navbar_component.rb', line 17 def logo_link(title: application_name) link_to title, blacklight_config.logo_link, class: 'mb-0 navbar-brand navbar-logo' end  |