Class: Flowbite::Breadcrumb::Item
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Flowbite::Breadcrumb::Item
- 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) ⇒ Item
constructor
A new instance of Item.
Constructor Details
#initialize(href:, **options) ⇒ Item
Returns a new instance of Item.
15 16 17 18 19 |
# File 'app/components/flowbite/breadcrumb/item.rb', line 15 def initialize(href:, **) super() @href = href @options = end |
Instance Attribute Details
#href ⇒ Object (readonly)
Returns the value of attribute href.
13 14 15 |
# File 'app/components/flowbite/breadcrumb/item.rb', line 13 def href @href end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
13 14 15 |
# File 'app/components/flowbite/breadcrumb/item.rb', line 13 def @options end |
Instance Method Details
#call ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'app/components/flowbite/breadcrumb/item.rb', line 21 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 |