diff --git a/app/helpers/icon_helper.rb b/app/helpers/icon_helper.rb index 3e1a847f3..d3dde8531 100644 --- a/app/helpers/icon_helper.rb +++ b/app/helpers/icon_helper.rb @@ -4,8 +4,9 @@ module IconHelper tag.i(class: "icon #{icon_class} #{klass}", **options) end - def svg_icon_tag(type, path, **options) - tag.svg(class: "icon svg-icon #{type}", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", **options) do + def svg_icon_tag(type, path, class: nil, **options) + klass = binding.local_variable_get(:class) + tag.svg(class: "icon svg-icon #{type} #{klass}", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", **options) do tag.path(fill: "currentColor", d: path) end end diff --git a/app/views/posts/show.html+tooltip.erb b/app/views/posts/show.html+tooltip.erb index b953115cd..1a43a20ee 100644 --- a/app/views/posts/show.html+tooltip.erb +++ b/app/views/posts/show.html+tooltip.erb @@ -8,7 +8,7 @@ <%= @post.score %> - <%= upvote_icon(class: "fa-xs") %> + <%= upvote_icon %> <% if @post.last_commented_at.present? %>