Class: Primer::TimelineItemComponent::Body

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

Constant Summary

Constants included from FetchOrFallbackHelper

FetchOrFallbackHelper::InvalidValueError

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from FetchOrFallbackHelper

#fetch_or_fallback

Methods included from ClassNameHelper

#class_names

Constructor Details

#initialize(**kwargs) ⇒ Body

Returns a new instance of Body.



59
60
61
62
63
64
65
66
# File 'app/components/primer/timeline_item_component.rb', line 59

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

Instance Attribute Details

#kwargsObject (readonly)

Returns the value of attribute kwargs.



58
59
60
# File 'app/components/primer/timeline_item_component.rb', line 58

def kwargs
  @kwargs
end