Class: Yattho::Beta::Breadcrumbs
- Defined in:
- app/components/yattho/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
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
Constructor Details
#initialize(**system_arguments) ⇒ Breadcrumbs
Returns a new instance of Breadcrumbs.
42 43 44 45 46 47 |
# File 'app/components/yattho/beta/breadcrumbs.rb', line 42 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
49 50 51 |
# File 'app/components/yattho/beta/breadcrumbs.rb', line 49 def render? items.any? end |