diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-03 18:09:44 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-03 18:09:44 +0300 |
commit | 31979cb3238a9993bd9834ff3cf4099f43257816 (patch) | |
tree | 0740953d332004963d34fffb4c0eff1d12a49a43 /app/helpers/icons_helper.rb | |
parent | a70e2c041864b6cd754f3f0ab225e0e02b59ebaf (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/icons_helper.rb')
-rw-r--r-- | app/helpers/icons_helper.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb index d5467ffb452..7376b92f111 100644 --- a/app/helpers/icons_helper.rb +++ b/app/helpers/icons_helper.rb @@ -45,7 +45,7 @@ module IconsHelper ActionController::Base.helpers.image_path('file_icons.svg', host: sprite_base_url) end - def sprite_icon(icon_name, size: nil, css_class: nil) + def sprite_icon(icon_name, size: DEFAULT_ICON_SIZE, css_class: nil) if known_sprites&.exclude?(icon_name) exception = ArgumentError.new("#{icon_name} is not a known icon in @gitlab-org/gitlab-svg") Gitlab::ErrorTracking.track_and_raise_for_dev_exception(exception) @@ -117,7 +117,9 @@ module IconsHelper 'earth' end - sprite_icon(name, size: DEFAULT_ICON_SIZE, css_class: 'gl-vertical-align-text-bottom') + css_class = options.delete(:class) + + sprite_icon(name, size: DEFAULT_ICON_SIZE, css_class: css_class) end def file_type_icon_class(type, mode, name) |