-
Notifications
You must be signed in to change notification settings - Fork 132
Open
Description
Hi,
First I want to say that the toast notification component is amazing. Just verifying that it isn't quite possible to render two toasts at two different positions?
I copied this to my .js file:
window.toast = function (message, options = {}) {
let description = '';
let type = 'default';
let position = 'top-center';
let html = '';
if (typeof options.description != 'undefined') description = options.description;
if (typeof options.type != 'undefined') type = options.type;
if (typeof options.position != 'undefined') position = options.position;
if (typeof options.html != 'undefined') html = options.html;
window.dispatchEvent(new CustomEvent('toast-show', {
detail: {
type: type,
message: message,
description: description,
position: position,
html: html
}
}));
}
And I invoke two toasts one after the other:
x-init="toast('some message', {'position': 'bottom-right', 'type': 'success'})"
....Later:
toast('Copied to clipboard')
When the 2nd toast is invoked, both toasts are now positioned top-center.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels