Class: Primer::BoxComponent
- Defined in:
- app/components/primer/box_component.rb
Overview
A basic wrapper component for most layout related needs.
Constant Summary
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::InvalidValueError
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(**system_arguments) ⇒ BoxComponent
constructor
A new instance of BoxComponent.
Methods included from JoinStyleArgumentsHelper
Methods included from FetchOrFallbackHelper
#fetch_or_fallback, #fetch_or_fallback_boolean
Methods included from ClassNameHelper
Constructor Details
#initialize(**system_arguments) ⇒ BoxComponent
Returns a new instance of BoxComponent.
7 8 9 10 |
# File 'app/components/primer/box_component.rb', line 7 def initialize(**system_arguments) @system_arguments = system_arguments @system_arguments[:tag] = :div end |
Instance Method Details
#call ⇒ Object
12 13 14 |
# File 'app/components/primer/box_component.rb', line 12 def call render(Primer::BaseComponent.new(**@system_arguments)) { content } end |