diff --git a/src/components/board/CardThumbnail.tsx b/src/components/board/CardThumbnail.tsx index cd9d1e9..88bb83b 100644 --- a/src/components/board/CardThumbnail.tsx +++ b/src/components/board/CardThumbnail.tsx @@ -1,4 +1,5 @@ import { format, isPast, isToday } from "date-fns"; +import { motion, useReducedMotion } from "framer-motion"; import { useSortable } from "@dnd-kit/sortable"; import { CSS } from "@dnd-kit/utilities"; import type { Card, Label } from "@/types/board"; @@ -13,6 +14,8 @@ interface CardThumbnailProps { } export function CardThumbnail({ card, boardLabels, columnId, onCardClick }: CardThumbnailProps) { + const prefersReducedMotion = useReducedMotion(); + const { attributes, listeners, @@ -40,11 +43,14 @@ export function CardThumbnail({ card, boardLabels, columnId, onCardClick }: Card } return ( - + ); } diff --git a/src/components/board/KanbanColumn.tsx b/src/components/board/KanbanColumn.tsx index d63de43..9b098d7 100644 --- a/src/components/board/KanbanColumn.tsx +++ b/src/components/board/KanbanColumn.tsx @@ -1,5 +1,6 @@ import { useState } from "react"; import { Plus } from "lucide-react"; +import { motion, useReducedMotion } from "framer-motion"; import { useDroppable } from "@dnd-kit/core"; import { SortableContext, @@ -29,6 +30,7 @@ interface KanbanColumnProps { export function KanbanColumn({ column, onCardClick }: KanbanColumnProps) { const [showAddCard, setShowAddCard] = useState(false); const board = useBoardStore((s) => s.board); + const prefersReducedMotion = useReducedMotion(); const width = WIDTH_MAP[column.width]; @@ -59,10 +61,13 @@ export function KanbanColumn({ column, onCardClick }: KanbanColumnProps) { }; return ( -
{/* The column header is the drag handle for column reordering */} @@ -113,6 +118,6 @@ export function KanbanColumn({ column, onCardClick }: KanbanColumnProps) {
)} - + ); } diff --git a/src/components/boards/BoardCard.tsx b/src/components/boards/BoardCard.tsx index 9d15376..20b9686 100644 --- a/src/components/boards/BoardCard.tsx +++ b/src/components/boards/BoardCard.tsx @@ -1,5 +1,6 @@ import { useState } from "react"; import { formatDistanceToNow } from "date-fns"; +import { motion, useReducedMotion } from "framer-motion"; import { Trash2, Copy } from "lucide-react"; import { ContextMenu, @@ -24,10 +25,12 @@ import { deleteBoard, loadBoard, saveBoard } from "@/lib/storage"; interface BoardCardProps { board: BoardMeta; + index?: number; } -export function BoardCard({ board }: BoardCardProps) { +export function BoardCard({ board, index = 0 }: BoardCardProps) { const [confirmDelete, setConfirmDelete] = useState(false); + const prefersReducedMotion = useReducedMotion(); const setView = useAppStore((s) => s.setView); const addRecentBoard = useAppStore((s) => s.addRecentBoard); @@ -66,7 +69,11 @@ export function BoardCard({ board }: BoardCardProps) { } return ( - <> +