diff --git a/app/components/popup_menu_component.rb b/app/components/popup_menu_component.rb index 620a3e33b..8e9021be4 100644 --- a/app/components/popup_menu_component.rb +++ b/app/components/popup_menu_component.rb @@ -2,7 +2,14 @@ class PopupMenuComponent < ApplicationComponent include ViewComponent::SlotableV2 - delegate :ellipsis_icon, to: :helpers + attr_reader :classes + + renders_one :button renders_many :items + + # @param classes [String] A list of CSS classes for the root element. + def initialize(classes: nil) + @classes = classes + end end diff --git a/app/components/popup_menu_component/popup_menu_component.html.erb b/app/components/popup_menu_component/popup_menu_component.html.erb index 7e4904443..c7abca8c3 100644 --- a/app/components/popup_menu_component/popup_menu_component.html.erb +++ b/app/components/popup_menu_component/popup_menu_component.html.erb @@ -1,6 +1,10 @@ -
No posts found.
<% else %> -@@ -37,9 +35,9 @@
<%= link_to "#{similarity}%", iqdb_queries_path(post_id: post.id) %> similarity
- <% elsif size -%> + <% elsif show_size -%>- <%= link_to number_to_human_size(size), post.file_url %> + <%= link_to number_to_human_size(file_size), post.file_url %> (<%= post.image_width %>x<%= post.image_height %>)
<% elsif recommended -%> @@ -53,7 +51,7 @@ <% end %> <% elsif show_votes -%> -