Class: Avo::BreadcrumbElementComponent
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- Avo::BreadcrumbElementComponent
- Defined in:
- app/components/avo/breadcrumb_element_component.rb
Instance Method Summary collapse
Instance Method Details
#color_class ⇒ Object
16 17 18 |
# File 'app/components/avo/breadcrumb_element_component.rb', line 16 def color_class "breadcrumb-element--color-#{@color}" if @color.present? end |
#link? ⇒ Boolean
20 21 22 |
# File 'app/components/avo/breadcrumb_element_component.rb', line 20 def link? @url.present? end |
#wrapper_element(args = {}, &block) ⇒ Object
24 25 26 27 28 29 30 |
# File 'app/components/avo/breadcrumb_element_component.rb', line 24 def wrapper_element(args = {}, &block) if link? link_to @url, **args, &block else content_tag :span, **args, &block end end |