Class: Primer::SubheadComponent::Description

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(**kwargs) ⇒ Description

Returns a new instance of Description.



82
83
84
85
86
# File 'app/components/primer/subhead_component.rb', line 82

def initialize(**kwargs)
  @kwargs = kwargs
  @kwargs[:tag] = :div
  @kwargs[:classes] = class_names(@kwargs[:classes], "Subhead-description")
end

Instance Attribute Details

#kwargsObject (readonly)

Returns the value of attribute kwargs.



80
81
82
# File 'app/components/primer/subhead_component.rb', line 80

def kwargs
  @kwargs
end