Class: Primer::PopoverComponent::Heading

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

Overview

:nodoc:

Constant Summary

Constants included from FetchOrFallbackHelper

FetchOrFallbackHelper::InvalidValueError

Instance Method Summary collapse

Methods included from JoinStyleArgumentsHelper

#join_style_arguments

Methods included from FetchOrFallbackHelper

#fetch_or_fallback, #fetch_or_fallback_boolean

Methods included from ClassNameHelper

#class_names

Constructor Details

#initialize(**system_arguments) ⇒ Heading

Returns a new instance of Heading.

Parameters:

  • system_arguments (Hash)

    <%= link_to_system_arguments_docs %>



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

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

Instance Method Details

#componentObject



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

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