Class: DsfrComponent::SkiplinkComponent

Inherits:
Base
  • Object
show all
Defined in:
app/components/dsfr_component/skiplink_component.rb

Constant Summary

Constants inherited from Base

Base::HEADING_LEVELS, Base::SIZES

Instance Attribute Summary

Attributes inherited from Base

#html_attributes

Instance Method Summary collapse

Constructor Details

#initialize(label:, links:, html_attributes: {}) ⇒ SkiplinkComponent

Returns a new instance of SkiplinkComponent.

Parameters:

  • label (String)

    le texte utilisé pour le aria-label de la nav qui affiche les liens d’évitement (par exemple « Accès rapide »)

  • links (Array)

    liste de liens HTML



5
6
7
8
9
10
# File 'app/components/dsfr_component/skiplink_component.rb', line 5

def initialize(label:, links:, html_attributes: {})
  @label = label
  @links = links

  super(html_attributes: html_attributes)
end