Method: Primer::Alpha::UnderlineNav#initialize
- Defined in:
- app/components/primer/alpha/underline_nav.rb
#initialize(label:, tag: TAG_DEFAULT, align: ALIGN_DEFAULT, body_arguments: {}, **system_arguments) ⇒ UnderlineNav
Returns a new instance of UnderlineNav.
56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'app/components/primer/alpha/underline_nav.rb', line 56 def initialize(label:, tag: TAG_DEFAULT, align: ALIGN_DEFAULT, body_arguments: {}, **system_arguments) @align = fetch_or_fallback(ALIGN_OPTIONS, align, ALIGN_DEFAULT) @system_arguments = system_arguments @system_arguments[:tag] = fetch_or_fallback(TAG_OPTIONS, tag, TAG_DEFAULT) @system_arguments[:classes] = underline_nav_classes(@system_arguments[:classes], @align) @body_arguments = body_arguments @body_arguments[:tag] = :ul @body_arguments[:classes] = underline_nav_body_classes(@body_arguments[:classes]) aria_label_for_page_nav(label) end |