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



83
84
85
86
87
88
89
90
# File 'app/components/primer/timeline_item_component.rb', line 83

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.



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

def kwargs
  @kwargs
end