mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-09-01 02:38:55 +00:00
20 lines
418 B
JavaScript
20 lines
418 B
JavaScript
/**
|
|
* Alpine.data('toastContainer') - Toast notification container
|
|
* Renders toast items from the global $store.toast
|
|
*/
|
|
import Alpine from '@alpinejs/csp';
|
|
|
|
Alpine.data('toastContainer', () => ({
|
|
items() {
|
|
return Alpine.store('toast').items;
|
|
},
|
|
|
|
dismiss(id) {
|
|
Alpine.store('toast').dismiss(id);
|
|
},
|
|
|
|
iconFor(type) {
|
|
return Alpine.store('toast').iconFor(type);
|
|
}
|
|
}));
|