Привет. Можешь ли ты улучшить компонент ProjectCard так, чтобы все карточки по высоте…
- User
Привет. Можешь ли ты улучшить компонент ProjectCard так, чтобы все карточки по высоте были одинаковыми, а текст и заголовок не был сокращён или урезан и был отображён полностью. Для этого используй пример карточки EngineeringCard.
ProjectCard:
const ProjectCard: React.FC<{ project: Project }> = ({ project }) => { return ( <div className="pretty-shadow-light bg-white rounded-lg border shadow-md overflow-hidden h-full flex flex-col"> <div className="relative w-full h-[240px]"> <img src={project.imageUrl} alt={project.title} className="object-cover w-full h-full" /> </div> <div className="p-4 flex flex-col flex-grow"> <div className="flex flex-col flex-grow"> <h3 className="text-xl font-semibold mb-3"> {project.title} </h3> <div className="flex flex-col gap-2 mb-4 text-gray-600"> <div className="flex items-center gap-2"> <FontAwesomeIcon icon={faCalendarAlt} className="w-4 h-4" /> <span>{project.date}</span> </div> <div className="flex items-center gap-2"> <FontAwesomeIcon icon={faMapMarkerAlt} className="w-4 h-4" /> <span>{project.location}</span> </div> </div> <p className="mb-4 flex-grow"> {project.description} </p> </div> <Link href={`/projects/${project.slug}`} className="w-full bg-red-500 text-white text-base md:text-lg py-2 px-4 rounded hover:bg-red-600 transition-colors duration-300 text-center mt-4" > Подробнее </Link> </div> </div> ); };EngineeringCard:
const EngineeringCard: React.FC<{ card: EngineeringCard }> = ({ card }) => { return ( <div className="pretty-shadow-light bg-white rounded-lg border shadow-md overflow-hidden h-full flex flex-col"> <div className="relative h-[250px]"> <img src={card.imageUrl} alt={card.title} className="object-cover w-full h-full" /> </div> <div className="p-4 flex flex-col justify-between flex-grow"> <div> <div className="flex items-center gap-2 mb-3"> <span className="text-red-500">{card.icon}</span> <h3 className="text-xl font-semibold">{card.title}</h3> </div> <div className="flex flex-col gap-2 mb-4 text-gray-600"> <div className="flex items-center gap-2"> <FontAwesomeIcon icon={faCalendarAlt} className="w-4 h-4" /> <span>{card.date}</span> </div> <div className="flex items-center gap-2"> <FontAwesomeIcon icon={faMapMarkerAlt} className="w-4 h-4" /> <span>{card.location}</span> </div> </div> <p className="mb-4">{card.description}</p> </div> <Link href={`/engineering/${card.slug}`} className="w-full bg-red-500 text-white text-base md:text-lg py-2 px-4 rounded hover:bg-red-600 transition-colors duration-300 text-center" > Подробнее </Link> </div> </div> ); }; - Assistant