Class: Flowbite::BreadcrumbItem
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Flowbite::BreadcrumbItem
- Defined in:
- app/components/flowbite/breadcrumb_item.rb,
app/components/flowbite/breadcrumb_item/first.rb,
app/components/flowbite/breadcrumb_item/current.rb
Overview
Base class for rendering a breadcrumb item (middle items in the breadcrumb trail).
Defined Under Namespace
Instance Attribute Summary collapse
-
#href ⇒ Object
readonly
Returns the value of attribute href.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(href:, **options) ⇒ BreadcrumbItem
constructor
A new instance of BreadcrumbItem.
Constructor Details
#initialize(href:, **options) ⇒ BreadcrumbItem
Returns a new instance of BreadcrumbItem.
14 15 16 17 18 |
# File 'app/components/flowbite/breadcrumb_item.rb', line 14 def initialize(href:, **) super() @href = href = end |
Instance Attribute Details
#href ⇒ Object (readonly)
Returns the value of attribute href.
12 13 14 |
# File 'app/components/flowbite/breadcrumb_item.rb', line 12 def href @href end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
12 13 14 |
# File 'app/components/flowbite/breadcrumb_item.rb', line 12 def end |
Instance Method Details
#call ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'app/components/flowbite/breadcrumb_item.rb', line 20 def call content_tag(:li, ) do content_tag(:div, class: "flex items-center") do concat(render(prefix_icon)) if prefix_icon concat(render_link) end end end |