Refactor: ProjectCard 리팩토링

This commit is contained in:
홍창기 2024-08-30 17:58:45 +09:00
parent 971aa25079
commit 60145471f8

View File

@ -1,5 +1,4 @@
import { Compass } from 'lucide-react'; import { Compass } from 'lucide-react';
import { cn } from '@/lib/utils';
interface ProjectCardProps { interface ProjectCardProps {
title: string; title: string;
@ -12,10 +11,7 @@ export default function ProjectCard({ title, description, imageUrl, onClick }: P
return ( return (
<div <div
onClick={onClick} onClick={onClick}
className={cn( className="relative flex w-[327px] cursor-pointer items-start gap-4 overflow-hidden rounded-lg border border-gray-200 bg-white p-4 transition-colors hover:bg-gray-100 hover:text-gray-900 dark:border-gray-800 dark:bg-gray-950 dark:hover:bg-gray-800 dark:hover:text-gray-50"
'relative flex w-[327px] cursor-pointer items-start gap-4 overflow-hidden rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-800',
'transition-transform hover:scale-105'
)}
> >
<div className="flex h-24 w-24 items-center justify-center rounded-lg bg-gray-100"> <div className="flex h-24 w-24 items-center justify-center rounded-lg bg-gray-100">
{imageUrl ? ( {imageUrl ? (