Method: Primer::Alpha::Overlay::Body#initialize

Defined in:
app/components/primer/alpha/overlay/body.rb

#initialize(padding: DEFAULT_PADDING, **system_arguments) ⇒ Body

Returns a new instance of Body.

Parameters:

  • system_arguments (Hash)

    <%= link_to_system_arguments_docs %>

[View source]

10
11
12
13
14
15
16
17
18
# File 'app/components/primer/alpha/overlay/body.rb', line 10

def initialize(padding: DEFAULT_PADDING, **system_arguments)
  @system_arguments = deny_tag_argument(**system_arguments)
  @system_arguments[:tag] = :div
  @system_arguments[:classes] = class_names(
    "Overlay-body",
    PADDING_MAPPINGS[fetch_or_fallback(PADDING_OPTIONS, padding, DEFAULT_PADDING)],
    system_arguments[:classes]
  )
end