Class: Primer::PopoverComponent::Heading

Inherits:
ViewComponent::Slot
  • Object
show all
Defined in:
app/components/primer/popover_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(**kwargs) ⇒ Heading

Returns a new instance of Heading.

Parameters:

  • kwargs (Hash)

    <%= link_to_style_arguments_docs %>



62
63
64
65
66
# File 'app/components/primer/popover_component.rb', line 62

def initialize(**kwargs)
  @kwargs = kwargs
  @kwargs[:mb] ||= 2
  @kwargs[:tag] ||= :h4
end

Instance Method Details

#componentObject



68
69
70
# File 'app/components/primer/popover_component.rb', line 68

def component
  Primer::HeadingComponent.new(**@kwargs)
end