MCPcopy Create free account
hub / github.com/GreatStackDev/project-management / ProjectCard

Function ProjectCard

src/components/ProjectCard.jsx:11–48  ·  view source on GitHub ↗
({ project })

Source from the content-addressed store, hash-verified

9};
10
11const ProjectCard = ({ project }) => {
12 return (
13 <Link to={`/projectsDetail?id=${project.id}&tab=tasks`} className="bg-white dark:bg-zinc-950 dark:bg-gradient-to-br dark:from-zinc-800/70 dark:to-zinc-900/50 border border-gray-200 dark:border-zinc-800 hover:border-gray-300 dark:hover:border-zinc-700 rounded-lg p-5 transition-all duration-200 group">
14 {/* Header */}
15 <div className="flex items-start justify-between mb-3">
16 <div className="flex-1 min-w-0">
17 <h3 className="font-semibold text-gray-900 dark:text-zinc-200 mb-1 truncate group-hover:text-blue-500 dark:group-hover:text-blue-400 transition-colors">
18 {project.name}
19 </h3>
20 <p className="text-gray-500 dark:text-zinc-400 text-sm line-clamp-2 mb-3">
21 {project.description || "No description"}
22 </p>
23 </div>
24 </div>
25
26 <div className="flex items-center justify-between mb-4">
27 <span className={`px-2 py-0.5 rounded text-xs ${statusColors[project.status]}`} >
28 {project.status.replace("_", " ")}
29 </span>
30 <span className="text-xs text-gray-500 dark:text-zinc-500 capitalize">
31 {project.priority} priority
32 </span>
33 </div>
34
35 {/* Progress */}
36 <div className="space-y-2">
37 <div className="flex items-center justify-between text-xs">
38 <span className="text-gray-500 dark:text-zinc-500">Progress</span>
39 <span className="text-gray-400 dark:text-zinc-400">{project.progress || 0}%</span>
40 </div>
41 <div className="w-full bg-gray-200 dark:bg-zinc-800 h-1.5 rounded">
42 <div className="h-1.5 rounded bg-blue-500" style={{ width: `${project.progress || 0}%` }} />
43 </div>
44 </div>
45
46 </Link>
47 );
48};
49
50export default ProjectCard;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected