Class: Primer::SubheadComponent::Heading

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ClassNameHelper

#class_names

Constructor Details

#initialize(danger: false, **system_arguments) ⇒ Heading



77
78
79
80
81
82
83
84
85
# File 'app/components/primer/subhead_component.rb', line 77

def initialize(danger: false, **system_arguments)
  @system_arguments = system_arguments
  @system_arguments[:tag] ||= :div
  @system_arguments[:classes] = class_names(
    @system_arguments[:classes],
    "Subhead-heading",
    "Subhead-heading--danger": danger
  )
end

Instance Attribute Details

#system_argumentsObject (readonly)

Returns the value of attribute system_arguments.



73
74
75
# File 'app/components/primer/subhead_component.rb', line 73

def system_arguments
  @system_arguments
end