Class: Primer::DetailsComponent::Body

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

Overview

Use the Body slot as the main content to be shown when triggered by the Summary.

Constant Summary

Constants included from FetchOrFallbackHelper

FetchOrFallbackHelper::InvalidValueError

Instance Method Summary collapse

Methods included from JoinStyleArgumentsHelper

#join_style_arguments

Methods included from FetchOrFallbackHelper

#fetch_or_fallback, #fetch_or_fallback_boolean

Methods included from ClassNameHelper

#class_names

Constructor Details

#initialize(**system_arguments) ⇒ Body

Returns a new instance of Body.

Parameters:

  • system_arguments (Hash)

    <%= link_to_system_arguments_docs %>



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

def initialize(**system_arguments)
  @system_arguments = system_arguments
  @system_arguments[:tag] ||= :div
end

Instance Method Details

#componentObject



62
63
64
# File 'app/components/primer/details_component.rb', line 62

def component
  Primer::BaseComponent.new(**@system_arguments)
end