34 lines
1.2 KiB
TypeScript
34 lines
1.2 KiB
TypeScript
import { ArrowRight, LucideIcon } from "lucide-react";
|
|
import React from "react";
|
|
|
|
interface ModuleCardProps {
|
|
title: string;
|
|
description: string;
|
|
icon: LucideIcon;
|
|
onClick?: () => void;
|
|
}
|
|
|
|
const ModuleCard: React.FC<ModuleCardProps> = ({ title, description, icon: Icon, onClick }) => {
|
|
return (
|
|
<div
|
|
data-cmp="ModuleCard"
|
|
onClick={onClick}
|
|
className="group bg-card hover:bg-muted/50 border border-border rounded-xl p-6 transition-all duration-300 hover:shadow-custom cursor-pointer flex flex-col h-full relative overflow-hidden"
|
|
>
|
|
<div className="absolute top-0 right-0 p-4 opacity-0 group-hover:opacity-100 transition-opacity transform translate-x-2 group-hover:translate-x-0">
|
|
<ArrowRight className="w-5 h-5 text-primary" />
|
|
</div>
|
|
|
|
<div className="mb-4 p-3 bg-primary/10 w-fit rounded-lg group-hover:bg-primary/20 transition-colors">
|
|
<Icon className="w-6 h-6 text-primary" />
|
|
</div>
|
|
|
|
<h3 className="text-lg font-semibold text-foreground mb-2 group-hover:text-primary transition-colors">{title}</h3>
|
|
|
|
<p className="text-sm text-muted-foreground line-clamp-3 leading-relaxed">{description}</p>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default ModuleCard;
|