Toast tiene el ancho para cada uno
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 4s

This commit is contained in:
2026-04-27 18:20:10 +02:00
parent 670e9fd8fe
commit 627bfd78ad
10 changed files with 41 additions and 71 deletions

View File

@@ -520,7 +520,7 @@ export const Toast = (message, type = "alert-success", duration = 3500) => {
if (!container) {
container = h("div", {
id: "sigpro-toast-container",
class: "fixed top-0 right-0 z-[9999] p-4 flex flex-col gap-2 pointer-events-none"
class: "fixed top-0 right-0 z-[9999] p-4 flex flex-col items-end gap-2 pointer-events-none"
});
document.body.appendChild(container);
}
@@ -546,9 +546,10 @@ export const Toast = (message, type = "alert-success", duration = 3500) => {
const msgNode = typeof content === 'string' ? h("span", {}, content) : content;
return h("div", {
class: () => {
if (leaving()) return `alert alert-soft ${type} shadow-lg transition-all duration-300 translate-x-full opacity-0 pointer-events-auto`;
if (visible()) return `alert alert-soft ${type} shadow-lg transition-all duration-300 translate-x-0 opacity-100 pointer-events-auto`;
return `alert alert-soft ${type} shadow-lg transition-all duration-300 translate-x-10 opacity-0 pointer-events-auto`;
const base = `alert alert-soft ${type} shadow-lg transition-all duration-300 inline-flex w-auto whitespace-nowrap pointer-events-auto`;
if (leaving()) return `${base} translate-x-full opacity-0`;
if (visible()) return `${base} translate-x-0 opacity-100`;
return `${base} translate-x-10 opacity-0`;
}
}, [
msgNode,