File size: 899 Bytes
46adb1c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import React from 'react';

interface CardProps {
  username: string;
  title: string;
  description: string;
  emoji: string;
  colorFrom: string;
  colorTo: string;
  updateDate: string;
  numLikes: number;
}

const Card: React.FC<CardProps> = ({
  username,
  title,
  description,
  emoji,
  colorFrom,
  colorTo,
  updateDate,
  numLikes,
}) => {
  return (
    <div
      className={`bg-gradient-to-br from-${colorFrom}-500 to-${colorTo}-500 rounded-lg p-6 flex flex-col justify-between h-72`}
    >
      <div className="flex justify-between items-center">
        <h2 className="text-xl font-bold">{emoji}{username}/{title}</h2>
        <div className="flex items-center">
          <span>{numLikes}🀍</span>
        </div>
      </div>
      <div className="flex items-center h-full">
        <p className="text-2xl">{description}</p>
      </div>
    </div>
  );
};

export default Card;