Class: Primer::Box

Inherits:
Component
  • Object
show all
Defined in:
app/components/primer/box.rb

Overview

Box is a basic wrapper component for most layout related needs.

Instance Method Summary collapse

Constructor Details

#initialize(**system_arguments) ⇒ Box

Returns a new instance of Box.

Parameters:

  • system_arguments (Hash)

    <%= link_to_system_arguments_docs %>



9
10
11
12
13
# File 'app/components/primer/box.rb', line 9

def initialize(**system_arguments)
  @system_arguments = deny_tag_argument(**system_arguments)

  @system_arguments[:tag] = :div
end

Instance Method Details

#callObject



15
16
17
# File 'app/components/primer/box.rb', line 15

def call
  render(Primer::BaseComponent.new(**@system_arguments)) { content }
end