feat: add micro-animations to TopBar, toasts, settings, and shortcut help

This commit is contained in:
Your Name
2026-02-15 21:01:10 +02:00
parent 24219bb212
commit 85c54a3768
4 changed files with 49 additions and 15 deletions

View File

@@ -1,4 +1,5 @@
import { AnimatePresence, motion } from "framer-motion";
import { springs } from "@/lib/motion";
import { useToastStore } from "@/stores/toast-store";
const TYPE_STYLES = {
@@ -18,8 +19,8 @@ export function ToastContainer() {
key={toast.id}
initial={{ opacity: 0, y: 20, scale: 0.95 }}
animate={{ opacity: 1, y: 0, scale: 1 }}
exit={{ opacity: 0, y: 10, scale: 0.95 }}
transition={{ type: "spring", stiffness: 400, damping: 25 }}
exit={{ opacity: 0, y: 20, scale: 0.9 }}
transition={springs.wobbly}
className={`pointer-events-auto rounded-lg border px-4 py-2 text-sm shadow-md ${TYPE_STYLES[toast.type]}`}
>
{toast.message}