Class: DaisyUI::Item
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- DaisyUI::Item
- Defined in:
- app/components/daisy_ui/item.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(href: nil, **system_arguments) ⇒ Item
constructor
A new instance of Item.
Constructor Details
#initialize(href: nil, **system_arguments) ⇒ Item
Returns a new instance of Item.
5 6 7 8 |
# File 'app/components/daisy_ui/item.rb', line 5 def initialize(href: nil, **system_arguments) @href = href super(**system_arguments) end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'app/components/daisy_ui/item.rb', line 10 def call tag.li do if @href tag.a(href: @href, class: system_arguments[:class]) { content } else content end end end |