This commit is contained in:
2026-08-10 12:01:03 +07:00
commit 265b1202ad
95 changed files with 27718 additions and 0 deletions

17
src/components/Toast.tsx Normal file
View File

@@ -0,0 +1,17 @@
import { createPortal } from 'react-dom';
import { useToastStore } from '../store/useToast';
export function Toast() {
const toasts = useToastStore((s) => s.toasts);
if (toasts.length === 0) return null;
return createPortal(
<div aria-live="polite" role="status">
{toasts.map((t) => (
<div key={t.id} className="toast is-show">
{t.message}
</div>
))}
</div>,
document.body,
);
}