diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-15 21:09:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-15 21:09:50 +0300 |
commit | b302502690b2e1422a4ef6abebdcf3ff4dc88543 (patch) | |
tree | 0cd7ca6ff21b59c007277b5bae9611a7cedd8134 /app/views/layouts/_flash.html.haml | |
parent | b616fd825faac3e7f194e1f942ef30730021e463 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/layouts/_flash.html.haml')
-rw-r--r-- | app/views/layouts/_flash.html.haml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/layouts/_flash.html.haml b/app/views/layouts/_flash.html.haml index 21cccb86398..ab4b3cf6afd 100644 --- a/app/views/layouts/_flash.html.haml +++ b/app/views/layouts/_flash.html.haml @@ -1,6 +1,7 @@ -# We currently only support `alert`, `notice`, `success`, 'toast', and 'raw' - icons = {'alert' => 'error', 'notice' => 'information-o', 'success' => 'check-circle'} - type_to_variant = {'alert' => 'danger', 'notice' => 'info', 'success' => 'success'} +- closable = %w[alert notice success] .flash-container.flash-container-page.sticky{ data: { qa_selector: 'flash_container' } } - flash.each do |key, value| - if key == 'toast' && value @@ -13,6 +14,6 @@ %div{ class: "flash-#{key} mb-2", data: { testid: "alert-#{type_to_variant[key]}" } } = sprite_icon(icons[key], css_class: 'align-middle mr-1') unless icons[key].nil? %span= value - - if %w(alert notice success).include?(key) + - if closable.include?(key) %div{ class: "close-icon-wrapper js-close-icon" } = sprite_icon('close', css_class: 'close-icon gl-vertical-align-baseline!') |