2020-01-01 13:55:28 +05:30
|
|
|
-# We currently only support `alert`, `notice`, `success`, 'toast'
|
2020-03-13 15:44:24 +05:30
|
|
|
- icons = {'alert' => 'error', 'notice' => 'information-o', 'success' => 'check-circle'};
|
2019-12-04 20:38:33 +05:30
|
|
|
.flash-container.flash-container-page.sticky
|
2018-03-17 18:26:18 +05:30
|
|
|
- flash.each do |key, value|
|
2020-01-01 13:55:28 +05:30
|
|
|
- if key == 'toast' && value
|
|
|
|
.js-toast-message{ data: { message: value } }
|
|
|
|
- elsif value
|
2019-12-26 22:10:19 +05:30
|
|
|
%div{ class: "flash-#{key} mb-2" }
|
2020-03-13 15:44:24 +05:30
|
|
|
= sprite_icon(icons[key], size: 16, css_class: 'align-middle mr-1') unless icons[key].nil?
|
2019-12-04 20:38:33 +05:30
|
|
|
%span= value
|
2019-12-21 20:55:43 +05:30
|
|
|
%div{ class: "close-icon-wrapper js-close-icon" }
|
|
|
|
= sprite_icon('close', size: 16, css_class: 'close-icon')
|