Skip to content

Commit

Permalink
Use the ui/icon component to render the sidebar arrow
Browse files Browse the repository at this point in the history
  • Loading branch information
elia committed Aug 1, 2023
1 parent 1b08fed commit 34542bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
<p class="body-small-bold text-black"><%= @store.name %></p>
<p class="body-tiny text-gray-500"><%= @store.url %></p>
</div>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
<path d="M10.6693 6.27614L4.93158 12.0139L3.98877 11.0711L9.7265 5.33333H4.66932V4H12.0026V11.3333H10.6693V6.27614Z" fill="#A3A3A3"/>
</svg>
<%= render @icon_component.new(name: 'arrow-right-up-line', class: 'w-4 h-4 fill-gray-400') %>
<% end %>
<div data-controller="main-nav" class="mt-2">
<ul>
Expand Down
5 changes: 4 additions & 1 deletion admin/app/components/solidus_admin/sidebar/component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ def initialize(
store:,
logo_path: SolidusAdmin::Config.logo_path,
items: container["main_nav_items"],
icon_component: component("ui/icon"),
item_component: component("sidebar/item"),
account_nav_component: component("sidebar/account_nav")
)
@logo_path = logo_path
@items = items
@store = store

@icon_component = icon_component
@item_component = item_component
@account_nav_component = account_nav_component
@store = store
end

def items
Expand Down

0 comments on commit 34542bf

Please sign in to comment.