Skip to content

Commit

Permalink
visual tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianthedev committed Jun 22, 2023
1 parent b3c24fa commit 8dd3d8c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
14 changes: 2 additions & 12 deletions app/components/avo/sidebar/link_component.html.erb
@@ -1,24 +1,14 @@
<% if path.present? %>
<%= send link_method, path, class: classes, active: active, target: target, data: data do %>
<% if icon.present? %>
<span class="min-w-[20px]">
<%= helpers.svg icon %>
</span>
<% end %>
<%= helpers.svg icon, class: "h-4" if icon.present? %>
<%= label %>
<% if target == :_blank %>
<%= helpers.svg('heroicons/outline/external-link', class: 'self-center ml-auto h-3 mr-2') %>
<% end %>
<% end %>
<% else %>
<%= content_tag :div, class: classes, active: active, target: target, data: data do %>
<% if icon.present? %>
<span class="min-w-[20px]">
<%= helpers.svg icon %>
</span>
<% end %>
<%= helpers.svg icon, class: "h-4" if icon.present? %>
<%= label %>
<% end %>
<% end %>
2 changes: 1 addition & 1 deletion app/components/avo/sidebar/link_component.rb
Expand Up @@ -30,6 +30,6 @@ def link_method
end

def classes
"px-4 pr-0 flex-1 flex mx-6 leading-none py-2 text-black rounded font-medium hover:bg-gray-100 gap-2 items-center"
"px-4 pr-0 flex-1 flex mx-6 leading-none py-2 text-black rounded font-medium hover:bg-gray-100 gap-1"
end
end
4 changes: 2 additions & 2 deletions spec/dummy/config/initializers/avo.rb
Expand Up @@ -76,7 +76,7 @@
## == Menus ==
config.main_menu = -> do
section I18n.t("avo.dashboards"), icon: "dummy-adjustments.svg" do
dashboard :dashy, visible: -> { true }
dashboard :dashy, visible: -> { true }, icon: "bolt"
dashboard "Sales", visible: -> { true }

group "All dashboards", visible: false, collapsable: true do
Expand Down Expand Up @@ -114,7 +114,7 @@
group "Blog", collapsable: true do
# resource :z_posts
resource :posts
resource :comments
resource :comments, icon: "chat-bubble-bottom-center-text"
resource :photo_comments, visible: -> do
authorize current_user, Comment, "index?", policy_class: PhotoCommentPolicy, raise_exception: false
end
Expand Down

0 comments on commit 8dd3d8c

Please sign in to comment.