Skip to content

Commit

Permalink
Adds ability to push html as main menu item label
Browse files Browse the repository at this point in the history
  • Loading branch information
damianlegawiec committed Mar 13, 2022
1 parent 3f34de6 commit 87d8228
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/helpers/spree/admin/navigation_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ def main_menu_item(text, url: nil, icon: nil)
link_to url, 'data-toggle': 'collapse', class: 'd-flex w-100 px-3 py-2 position-relative align-items-center' do
if icon.ends_with?('.svg')
svg_icon(name: icon, classes: 'mr-2 text-muted', width: MENU_ICON_SIZE, height: MENU_ICON_SIZE) +
content_tag(:span, " #{text}", class: 'text-muted') +
content_tag(:span, raw(" #{text}"), class: 'text-muted') +
svg_icon(name: 'chevron-right.svg', classes: 'drop-menu-indicator text-muted position-absolute', width: (MENU_ICON_SIZE - 8), height: (MENU_ICON_SIZE - 8))
else
content_tag(:span, nil, class: "icon text-muted icon-#{icon} mr-2") +
content_tag(:span, " #{text}", class: 'text-muted') +
content_tag(:span, raw(" #{text}"), class: 'text-muted') +
svg_icon(name: 'chevron-right.svg', classes: 'drop-menu-indicator text-muted position-absolute', width: (MENU_ICON_SIZE - 8), height: (MENU_ICON_SIZE - 8))
end
end
Expand Down

0 comments on commit 87d8228

Please sign in to comment.