feat: add loading bar and toast notification system with responsive design

This commit is contained in:
2026-02-25 16:30:45 +00:00
parent e13e696253
commit fdeeac88e2
5 changed files with 316 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
/**
* Portal action — teleports an element to document.body.
* Usage: <div use:portal>…</div>
* SSR-safe: only runs when document is available.
*/
export function portal(node: HTMLElement) {
if (typeof document === "undefined") return
document.body.appendChild(node)
return {
destroy() {
if (node.parentNode) {
node.parentNode.removeChild(node)
}
},
}
}