Files
openfoodnetwork/app/views/admin/shared/_flashes.html.haml
David Cook 7fe2284d84 Refactor: Move ID out of partial
Because it can only be used once. But the classname can be used each time the partial is included.
2023-12-06 14:18:58 +11:00

9 lines
344 B
Plaintext

.flash-container
- if defined? flashes
- flashes.each do |type, msg|
.animate-show{"data-controller": "flash", "data-flash-auto-close-value": type == 'success'}
.flash{type: "#{type}", class: "#{type}"}
.msg= msg
.actions
%button.secondary{"data-action": "click->flash#close"}= t('.dismiss')