Class: DesignSystem::Generic::BreadcrumbsComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- DesignSystem::Generic::BreadcrumbsComponent
- Defined in:
- app/components/design_system/generic/breadcrumbs_component.rb
Overview
Breadcrumb trail rendered into the :breadcrumbs content_for slot by the fixed-elements builder. Brands own the markup via their own templates.
Direct Known Subclasses
DesignSystem::Govuk::BreadcrumbsComponent, Nhsuk::BreadcrumbsComponent
Instance Attribute Summary collapse
-
#breadcrumbs ⇒ Object
readonly
Returns the value of attribute breadcrumbs.
Instance Method Summary collapse
- #current_page_aria(breadcrumb) ⇒ Object
-
#initialize(breadcrumbs:) ⇒ BreadcrumbsComponent
constructor
A new instance of BreadcrumbsComponent.
Methods included from Helpers::CssHelper
Methods included from BrandDerivable
Constructor Details
#initialize(breadcrumbs:) ⇒ BreadcrumbsComponent
Returns a new instance of BreadcrumbsComponent.
6 7 8 9 |
# File 'app/components/design_system/generic/breadcrumbs_component.rb', line 6 def initialize(breadcrumbs:) super() @breadcrumbs = end |
Instance Attribute Details
#breadcrumbs ⇒ Object (readonly)
Returns the value of attribute breadcrumbs.
11 12 13 |
# File 'app/components/design_system/generic/breadcrumbs_component.rb', line 11 def @breadcrumbs end |
Instance Method Details
#current_page_aria(breadcrumb) ⇒ Object
13 14 15 |
# File 'app/components/design_system/generic/breadcrumbs_component.rb', line 13 def current_page_aria() helpers.current_page?([:path]) ? 'page' : nil end |