Method: Primer::Beta::TimelineItem#initialize

Defined in:
app/components/primer/beta/timeline_item.rb

#initialize(condensed: false, **system_arguments) ⇒ TimelineItem

Returns a new instance of TimelineItem.

Parameters:

  • condensed (Boolean) (defaults to: false)

    Reduce the vertical padding and remove the background from the badge item. Most commonly used in commits.

  • system_arguments (Hash)

    <%= link_to_system_arguments_docs %>


43
44
45
46
47
48
49
50
51
# File 'app/components/primer/beta/timeline_item.rb', line 43

def initialize(condensed: false, **system_arguments)
  @system_arguments = deny_tag_argument(**system_arguments)
  @system_arguments[:tag] = :div
  @system_arguments[:classes] = class_names(
    "TimelineItem",
    condensed ? "TimelineItem--condensed" : "",
    system_arguments[:classes]
  )
end