This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
export function initFlash() {
|
||||
document.querySelectorAll('[data-component="flash"]').forEach((flash) => {
|
||||
flash.addEventListener('click', (event) => {
|
||||
const target = event.target;
|
||||
if (target instanceof HTMLElement && target.dataset.action === 'flash-close') {
|
||||
flash.remove();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user