Method: Primer::Alpha::UnderlinePanels#initialize
- Defined in:
- app/components/primer/alpha/underline_panels.rb
#initialize(label:, align: ALIGN_DEFAULT, body_arguments: {}, wrapper_arguments: {}, **system_arguments) ⇒ UnderlinePanels
Returns a new instance of UnderlinePanels.
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'app/components/primer/alpha/underline_panels.rb', line 44 def initialize(label:, align: ALIGN_DEFAULT, body_arguments: {}, wrapper_arguments: {}, **system_arguments) @align = fetch_or_fallback(ALIGN_OPTIONS, align, ALIGN_DEFAULT) @wrapper_arguments = wrapper_arguments @system_arguments = deny_tag_argument(**system_arguments) @system_arguments[:tag] = :div @system_arguments[:classes] = underline_nav_classes(@system_arguments[:classes], @align) @body_arguments = deny_tag_argument(**body_arguments) @body_arguments[:tag] = :ul @body_arguments[:classes] = underline_nav_body_classes(@body_arguments[:classes]) @body_arguments[:role] = :tablist @body_arguments[:"aria-label"] = label end |