Module: BetterUi::General::Components::Dropdown::ItemHelper
- Included in:
- Application::Sidebar::Component, ApplicationHelper
- Defined in:
- app/helpers/better_ui/general/components/dropdown/item_helper.rb
Instance Method Summary collapse
-
#bui_dropdown_item(text = nil, icon: nil, href: nil, theme: :default, disabled: false, active: false, classes: '', **options) ⇒ String
Crea un elemento del menu dropdown.
Instance Method Details
#bui_dropdown_item(text = nil, icon: nil, href: nil, theme: :default, disabled: false, active: false, classes: '', **options) ⇒ String
Crea un elemento del menu dropdown.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'app/helpers/better_ui/general/components/dropdown/item_helper.rb', line 40 def bui_dropdown_item( text = nil, icon: nil, href: nil, theme: :default, disabled: false, active: false, classes: '', ** ) # Supporta sia sintassi posizionale che keyword per backward compatibility item_text = text || .delete(:text) render BetterUi::General::Dropdown::ItemComponent.new( text: item_text, icon: icon, href: href, theme: theme, disabled: disabled, active: active, classes: classes, ** ) end |