Class: Primer::BorderBoxComponent
- Includes:
- ViewComponent::SlotableV2
- Defined in:
- app/components/primer/border_box_component.rb
Overview
BorderBox is a Box component with a border.
Constant Summary
Constants inherited from Component
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::InvalidValueError
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(**system_arguments) ⇒ BorderBoxComponent
constructor
A new instance of BorderBoxComponent.
- #render? ⇒ Boolean
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) ⇒ BorderBoxComponent
Returns a new instance of BorderBoxComponent.
82 83 84 85 86 |
# File 'app/components/primer/border_box_component.rb', line 82 def initialize(**system_arguments) @system_arguments = system_arguments @system_arguments[:tag] = :div @system_arguments[:classes] = class_names("Box", system_arguments[:classes]) end |
Class Method Details
.status ⇒ Object
92 93 94 |
# File 'app/components/primer/border_box_component.rb', line 92 def self.status Primer::Component::STATUSES[:beta] end |
Instance Method Details
#render? ⇒ Boolean
88 89 90 |
# File 'app/components/primer/border_box_component.rb', line 88 def render? rows.any? || header.present? || body.present? || .present? end |