class Primer::Beta::NavList::Heading
See <%= link_to_component(Primer::Beta::NavList) %> for usage examples.
The heading placed above a ‘NavList`’s items.
def call
def call render( Primer::BaseComponent.new( tag: :"h#{heading_level}", id: id, classes: "ActionListHeader", **system_arguments ).with_content(title) ) end
def initialize(title:, id: self.class.generate_id, heading_level: 2, **system_arguments)
-
system_arguments
(Hash
) -- <%= link_to_system_arguments_docs %> -
heading_level
(Integer
) -- The heading level, i.e. 2 for an ``, 3 for an `
`, etc.
-
id
(String
) -- The value of the ID HTML attribute. Auto-generated by default. -
title
(String
) -- The text content of the heading.
def initialize(title:, id: self.class.generate_id, heading_level: 2, **system_arguments) @title = title @id = id @heading_level = heading_level @system_arguments = system_arguments end