Class: Primer::Beta::Breadcrumbs
- Defined in:
 - app/components/primer/beta/breadcrumbs.rb
 
Overview
Use ‘Breadcrumbs` to display page hierarchy.
#### Known issues
##### Responsiveness
‘Breadcrumbs` is not optimized for responsive designs.
Defined Under Namespace
Classes: Item
Constant Summary collapse
- PADDING_MESSAGE =
 "Padding system arguments are not allowed on Breadcrumbs. Consider using margins instead."- FONT_SIZE_MESSAGE =
 "Breadcrumbs do not support the font_size system argument."- ARIA_LABEL =
 { label: "Breadcrumb" }.freeze
- ARGS_DENYLIST =
 { [:p, :pt, :pb, :pr, :pl, :px, :py] => PADDING_MESSAGE, [:font_size] => FONT_SIZE_MESSAGE }.freeze
Constants inherited from Component
Component::INVALID_ARIA_LABEL_TAGS
Constants included from Status::Dsl
Constants included from ViewHelper
Constants included from TestSelectorHelper
TestSelectorHelper::TEST_SELECTOR_TAG
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::InvalidValueError
Constants included from AttributesHelper
AttributesHelper::PLURAL_ARIA_ATTRIBUTES, AttributesHelper::PLURAL_DATA_ATTRIBUTES
Instance Method Summary collapse
- 
  
    
      #initialize(**system_arguments)  ⇒ Breadcrumbs 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Breadcrumbs.
 - #render? ⇒ Boolean
 
Methods inherited from Component
Methods included from JoinStyleArgumentsHelper
Methods included from TestSelectorHelper
Methods included from FetchOrFallbackHelper
#fetch_or_fallback, #fetch_or_fallback_boolean, #silence_deprecations?
Methods included from ClassNameHelper
Methods included from AttributesHelper
#aria, #data, #merge_aria, #merge_data, #merge_prefixed_attribute_hashes
Constructor Details
#initialize(**system_arguments) ⇒ Breadcrumbs
Returns a new instance of Breadcrumbs.
      35 36 37 38 39 40  | 
    
      # File 'app/components/primer/beta/breadcrumbs.rb', line 35 def initialize(**system_arguments) @system_arguments = deny_tag_argument(**system_arguments) @system_arguments[:tag] = :nav @system_arguments[:aria] = ARIA_LABEL @system_arguments[:system_arguments_denylist] = ARGS_DENYLIST end  | 
  
Instance Method Details
#render? ⇒ Boolean
      42 43 44  | 
    
      # File 'app/components/primer/beta/breadcrumbs.rb', line 42 def render? items.any? end  |