Class: FoxTail::BreadcrumbComponent
Instance Attribute Summary
#html_attributes
Instance Method Summary
collapse
classname_merger, #initialize, stimulus_merger, use_stimulus?, #with_html_attributes, #with_html_class
Methods inherited from Base
fox_tail_config
Instance Method Details
#before_render ⇒ Object
82
83
84
85
86
87
88
89
|
# File 'app/components/fox_tail/breadcrumb_component.rb', line 82
def before_render
super
with_separator_icon :chevron_right unless separator?
html_attributes[:aria] ||= {}
html_attributes[:aria][:label] = t("components.fox_tail.breadcrumb.label", default: "Breadcrumbs")
end
|
#call ⇒ Object
91
92
93
94
95
96
|
# File 'app/components/fox_tail/breadcrumb_component.rb', line 91
def call
content_tag :nav, html_attributes do
concat render_list
concat content if content?
end
end
|
#render? ⇒ Boolean
78
79
80
|
# File 'app/components/fox_tail/breadcrumb_component.rb', line 78
def render?
items?
end
|