Skip to content

Commit

Permalink
design: 프로젝트 카드의 크기를 맞추기 위해 text-overflow 수정
Browse files Browse the repository at this point in the history
text-ellipsis로 설정하고 overflow-hidden 설정해 프로젝트 제목이 길어져도 기존 height을 유지하도록 함
  • Loading branch information
surinkwon committed Jun 11, 2024
1 parent 440a553 commit 554703d
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions frontend/src/components/projects/ProjectCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ const ProjectCard = ({ project }: ProjectCardProps) => {
const { title, currentSprint } = project;
return (
<div className="w-[21.25rem] p-9 bg-gradient-to-bl from-white-transparent to-95% bg-middle-green">
<p className="mb-[1.125rem] text-xl font-bold text-white">{title}</p>
<p
title={title}
className="overflow-hidden text-xl font-bold text-white text-ellipsis whitespace-nowrap"
>
{title}
</p>
<div className="h-[3.9rem]">
<p className="mb-2.5 text-xs font-bold text-white">
{currentSprint && currentSprint.title}
Expand All @@ -27,16 +32,18 @@ const ProjectCard = ({ project }: ProjectCardProps) => {
<div className="flex flex-col items-center gap-3 font-bold text-middle-green">
<p className="text-m">
<span className="text-[2.25rem]">
{currentSprint.progressPercentage.toString().padStart(2, '0')}
</span>%
{currentSprint.progressPercentage.toString().padStart(2, "0")}
</span>
%
</p>
<p>진행률</p>
</div>
<div className="flex flex-col items-center gap-3 font-bold text-middle-green">
<p className="text-m">
<span className="text-[2.25rem]">
{currentSprint.myTasksLeft.toString().padStart(2, '0')}
</span>
{currentSprint.myTasksLeft.toString().padStart(2, "0")}
</span>
</p>
<p>내 업무</p>
</div>
Expand Down

0 comments on commit 554703d

Please sign in to comment.