Workflows index
This commit is contained in:
@@ -6,4 +6,14 @@ module ApplicationHelper
|
||||
|
||||
url_for(controller: controller_name, action: :index, project:)
|
||||
end
|
||||
|
||||
def mask_icon(icon, **options)
|
||||
# Renders a span as a masked icon
|
||||
case options[:class]
|
||||
when String then options[:class] += ' mask-icon'
|
||||
when nil then options[:class] = 'mask-icon'
|
||||
else options[:class] = Array(options[:class]) + ['mask-icon']
|
||||
end
|
||||
content_tag(:span, '', style: "--icon: url(#{image_path(icon)})", **options)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user