Class: Primer::BoxComponent
- Defined in:
- app/components/primer/box_component.rb
Overview
A basic wrapper component for most layout related needs.
Constant Summary
Constants inherited from Component
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::InvalidValueError
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(**system_arguments) ⇒ BoxComponent
constructor
A new instance of BoxComponent.
Methods included from ViewHelper
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.
13 14 15 16 |
# File 'app/components/primer/box_component.rb', line 13 def initialize(**system_arguments) @system_arguments = system_arguments @system_arguments[:tag] = :div end |
Class Method Details
Instance Method Details
#call ⇒ Object
18 19 20 |
# File 'app/components/primer/box_component.rb', line 18 def call render(Primer::BaseComponent.new(**@system_arguments)) { content } end |