class Primer::DetailsComponent
Use DetailsComponent to reveal content after clicking a button.
def initialize(overlay: NO_OVERLAY, reset: false, **system_arguments)
-
system_arguments(Hash) -- <%= link_to_system_arguments_docs %> -
reset(Boolean) -- Defatuls to false. If set to true, it will remove the default caret and remove style from the summary element -
overlay(Symbol) -- Dictates the type of overlay to render with. <%= one_of(Primer::DetailsComponent::OVERLAY_MAPPINGS.keys) %>
def initialize(overlay: NO_OVERLAY, reset: false, **system_arguments) @system_arguments = system_arguments @system_arguments[:tag] = :details @system_arguments[:classes] = class_names( system_arguments[:classes], OVERLAY_MAPPINGS[fetch_or_fallback(OVERLAY_MAPPINGS.keys, overlay, NO_OVERLAY)], "details-reset" => reset ) end
def render?
def render? summary.present? && body.present? end