Class: DaisyUI::Breadcrumbs

Inherits:
Base
  • Object
show all
Defined in:
lib/daisy_ui/breadcrumbs.rb

Constant Summary

Constants inherited from Base

DaisyUI::Base::BOOLS, DaisyUI::Base::COLOR_MODIFIERS

Instance Method Summary collapse

Methods inherited from Base

inherited, #initialize, register_modifiers

Constructor Details

This class inherits a constructor from DaisyUI::Base

Instance Method Details

#crumb(href: nil, **options, &block) ⇒ Object Also known as: breadcrumb, item, add



13
14
15
16
17
18
19
20
21
# File 'lib/daisy_ui/breadcrumbs.rb', line 13

def crumb(href: nil, **options, &block)
  li(class: component_classes(options:), **options) do
    if href
      a(href: href, &block)
    else
      yield
    end
  end
end

#view_templateObject



7
8
9
10
11
# File 'lib/daisy_ui/breadcrumbs.rb', line 7

def view_template(&)
  public_send(as, class: classes, **attributes) do
    ul(&)
  end
end