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(**kwargs) ⇒ BoxComponent
constructor
A new instance of BoxComponent.
Methods included from FetchOrFallbackHelper
Methods included from ClassNameHelper
Constructor Details
#initialize(**kwargs) ⇒ BoxComponent
Returns a new instance of BoxComponent.
7 8 9 10 |
# File 'app/components/primer/box_component.rb', line 7 def initialize(**kwargs) @kwargs = kwargs @kwargs[: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(**@kwargs)) { content } end |