class UiBibz::Ui::Core::Navigations::Components::BreadcrumbLink

Create a BreadcrumbLink

This element is an extend of UiBibz::Ui::Core::Component.

You can add HTML attributes using the html_options. You can pass arguments in options attribute:

UiBibz::Ui::Core::Navigations::Breadcrumb::Components::BreadcrumbLink.new(content, options = nil, html_options = nil)

UiBibz::Ui::Core::Navigations::Breadcrumb::Components::BreadcrumbLink.new(options = nil, html_options = nil) do
  content
end
UiBibz::Ui::Core::Navigations::Breadcrumb::Components::BreadcrumbLink.new('Home', { glyph: 'home', state: :active },{ class: 'test' }).render

UiBibz::Ui::Core::Navigations::Breadcrumb::Components::BreadcrumbLink.new({glyph: { name: 'eye', size: 3}, { class: 'test' }) do
  'Home'
end.render

Public Instance Methods

pre_render() click to toggle source

Render html tag

# File lib/ui_bibz/ui/core/navigations/components/breadcrumb_link.rb, line 46
def pre_render
  content_tag :li, link_html, html_options
end

Private Instance Methods

component_html_classes() click to toggle source
# File lib/ui_bibz/ui/core/navigations/components/breadcrumb_link.rb, line 56
def component_html_classes
  'breadcrumb-item'
end
component_html_options() click to toggle source
# File lib/ui_bibz/ui/core/navigations/components/breadcrumb_link.rb, line 52
def component_html_options
  super.merge(options[:current] ? { 'aria-current': 'page' } : {})
end
component_options() click to toggle source
# File lib/ui_bibz/ui/core/navigations/components/breadcrumb_link.rb, line 60
def component_options
  super.merge(options[:current] ? { status: :disabled } : {})
end