Module: ViewComponent::MenuComponentHelper

Defined in:
app/helpers/view_component/menu_component_helper.rb

Constant Summary collapse

ViewComponent::MenuItem

Instance Method Summary collapse

Instance Method Details



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'app/helpers/view_component/menu_component_helper.rb', line 7

def menu_component_old(menu_items:, icon_class: '', html_options: {})
  menu_items_with_options = menu_items.map do |item|
    item.options ||= {}
    item.url = item.url.presence || '#'
    item
  end

  render(
    'view_components/menu_component_old/menu_component',
    menu_items: menu_items_with_options,
    icon_class:,
    html_options:
  )
end