Class: Primer::BorderBoxComponent
- Includes:
- ViewComponent::Slotable
- Defined in:
- app/components/primer/border_box_component.rb
Overview
BorderBox is a Box component with a border.
Defined Under Namespace
Classes: Body, Footer, Header, Row
Constant Summary
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::InvalidValueError
Instance Method Summary collapse
-
#initialize(**system_arguments) ⇒ BorderBoxComponent
constructor
A new instance of BorderBoxComponent.
- #render? ⇒ Boolean
Methods included from JoinStyleArgumentsHelper
Methods included from FetchOrFallbackHelper
#fetch_or_fallback, #fetch_or_fallback_boolean
Methods included from ClassNameHelper
Constructor Details
#initialize(**system_arguments) ⇒ BorderBoxComponent
Returns a new instance of BorderBoxComponent.
24 25 26 27 28 29 30 31 |
# File 'app/components/primer/border_box_component.rb', line 24 def initialize(**system_arguments) @system_arguments = system_arguments @system_arguments[:tag] = :div @system_arguments[:classes] = class_names( "Box", system_arguments[:classes] ) end |
Instance Method Details
#render? ⇒ Boolean
33 34 35 |
# File 'app/components/primer/border_box_component.rb', line 33 def render? rows.any? || header.present? || body.present? || .present? end |