Skip to content

Commit f6da134

Browse files
authored
Merge pull request #185 from part3-4team-Taskify/minji
[Refactor, Style] mydashboard: 카드 간 여백 조정 / SideMenu: 상하 스크롤 제거, 제목 말줄임표 적용, 페이지 버튼 밀림 현상 수정 / 전체: 배경색 변경
2 parents cc4abf9 + 162581c commit f6da134

File tree

11 files changed

+45
-45
lines changed

11 files changed

+45
-45
lines changed

src/components/button/CardButton.tsx

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const CardButton: React.FC<CardButtonProps> = ({
6464
"border border-[var(--color-gray3)]",
6565
"min-w-0 w-full max-w-[260px] md:max-w-[247px] lg:max-w-[332px]",
6666
"h-[58px] md:h-[68px] lg:h-[70px]",
67-
"mt-[10px] md:mt-[16px] lg:mt-[20px]",
67+
"mt-[2px]", // 카드 세로 간격
6868
"text-lg md:text-2lg lg:text-2lg",
6969
isEditMode
7070
? "cursor-default hover:border-gray-300"
@@ -73,27 +73,28 @@ const CardButton: React.FC<CardButtonProps> = ({
7373
)}
7474
>
7575
{/* 왼쪽: 색상 도트 + 제목 + 왕관 */}
76-
<div className="flex items-center gap-[10px] overflow-hidden">
76+
<div className="flex items-center font-semibold gap-[10px] overflow-hidden">
7777
{/* 색상 원 */}
7878
<svg width="8" height="8" viewBox="0 0 8 8" fill={color}>
7979
<circle cx="4" cy="4" r="4" />
8080
</svg>
8181

8282
{/* 제목 */}
83-
<span className="text-black3 font-16sb truncate max-w-[90px] sm:max-w-[100px] md:max-w-[120px] lg:max-w-[160px]">
83+
<span className="text-black3 text-[14px] sm:text-[16px] truncate max-w-[90px] sm:max-w-[100px] md:max-w-[120px] lg:max-w-[160px]">
8484
{title}
8585
</span>
8686

8787
{/* 왕관 */}
88-
{showCrown && (
89-
<Image
90-
src="/svgs/icon-crown.svg"
91-
alt="crown Icon"
92-
width={20}
93-
height={20}
94-
className="hidden sm:block w-[20px] h-[20px]"
95-
/>
96-
)}
88+
<div className="relative w-[15px] h-[12px] md:w-[17px] md:h-[14px]">
89+
{showCrown && (
90+
<Image
91+
src="/svgs/icon-crown.svg"
92+
alt="crown Icon"
93+
fill
94+
className="object-contain"
95+
/>
96+
)}
97+
</div>
9798
</div>
9899

99100
{/* 오른쪽: 화살표 아이콘 or 수정/삭제 버튼 */}

src/components/button/DashboardAddButton.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ const DashboardAddButton: React.FC<
99
<button
1010
className={clsx(
1111
"flex justify-center items-center gap-[10px] bg-white transition-all",
12-
"rounded-lg px-4 py-3 font-16sb",
12+
"rounded-lg px-4 py-3",
1313
"border border-gray-300 hover:border-purple-500",
1414
"min-w-0 w-full max-w-[260px] md:max-w-[247px] lg:max-w-[332px]", // 반응형 너비
1515
"h-[58px] md:h-[68px] lg:h-[70px]", // 반응형 높이
16-
"mt-[10px] md:mt-[16px] lg:mt-[20px]", // 여백
17-
"text-lg md:text-2lg lg:text-2lg",
16+
"mt-[2px]", // 여백
17+
"text-[14px] sm:text-[16px]",
1818
"cursor-pointer",
1919
className
2020
)}
@@ -26,7 +26,7 @@ const DashboardAddButton: React.FC<
2626
alt="Plus Icon"
2727
width={24}
2828
height={24}
29-
className="w-[18px] h-[18px] md:w-[20px] md:h-[20px] lg:w-[22px] lg:h-[22px] p-1 rounded-md bg-purple-100"
29+
className="w-[18px] h-[18px] md:w-[20px] md:h-[20px] lg:w-[22px] lg:h-[22px] p-1 rounded-[4px] bg-[var(--color-violet8)]"
3030
/>
3131
</button>
3232
);

src/components/columnCard/Column.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export default function Column({
100100
return (
101101
<div
102102
className={`
103-
flex flex-col border-r border-[#EEEEEE] bg-gray-50 rounded-md p-4
103+
flex flex-col border-r border-[var(--color-gray4)] bg-[#F5F2FC] rounded-md p-4
104104
h-auto sm:m-h-screen
105105
max-h-[401px] sm:max-h-none w-full lg:w-[360px]
106106
`}

src/components/gnb/HeaderDashboard.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,11 @@ const HeaderDashboard: React.FC<HeaderDashboardProps> = ({
135135
)}
136136

137137
{/*헤더 제목*/}
138-
<div className="flex items-center gap-[8px]">
138+
<div className="flex font-bold items-center gap-[8px]">
139139
<p
140140
className={clsx(
141-
"font-20b text-black3 whitespace-nowrap",
141+
"text-[16px] sm:text-[20px] text-black3",
142+
"whitespace-nowrap truncate max-w-[100px] md:max-w-[400px]",
142143
variant !== "mydashboard" && variant !== "mypage"
143144
? "hidden lg:block"
144145
: ""

src/components/sideMenu/SideMenu.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export default function SideMenu({
3434
const [isCollapsed, setIsCollapsed] = useState(false);
3535
const [isModalOpen, setIsModalOpen] = useState(false);
3636

37-
const itemsPerPage = 15;
37+
const itemsPerPage = 14;
3838
const totalPages = Math.ceil(dashboardList.length / itemsPerPage);
3939
const startIndex = (currentPage - 1) * itemsPerPage;
4040
const endIndex = startIndex + itemsPerPage;
@@ -51,7 +51,7 @@ export default function SideMenu({
5151
return (
5252
<aside
5353
className={clsx(
54-
"h-screen overflow-y-auto border-r border-[var(--color-gray3)] px-3 py-5 transition-all duration-200 flex flex-col",
54+
"flex flex-col h-screen overflow-y-auto lg:overflow-y-hidden overflow-x-hidden border-r border-[var(--color-gray3)] px-3 py-5 transition-all duration-200",
5555
isCollapsed
5656
? "w-[67px]"
5757
: "w-[67px] sm:w-[67px] md:w-[160px] lg:w-[300px]"
@@ -126,7 +126,7 @@ export default function SideMenu({
126126
</div>
127127
</div>
128128

129-
<nav className="flex flex-col flex-1 justify-between">
129+
<nav className="flex flex-1 flex-col min-h-0 justify-between h-full">
130130
<div>
131131
{/* 대시보드 타이틀 + 추가 버튼 */}
132132
{!isCollapsed && (
@@ -169,7 +169,7 @@ export default function SideMenu({
169169
{/* 대시보드 목록 */}
170170
<ul
171171
className={clsx(
172-
"flex flex-col",
172+
"flex-1",
173173
isCollapsed
174174
? "items-center"
175175
: "items-start md:items-start sm:items-center w-full"
@@ -179,14 +179,14 @@ export default function SideMenu({
179179
<li
180180
key={dashboard.id}
181181
className={clsx(
182-
"w-full flex justify-center md:justify-start p-3 font-18r text-[var(--color-gray1)] transition-colors duration-200",
182+
"flex w-full justify-center md:justify-start p-3 font-18m text-[var(--color-gray1)] transition-colors duration-200",
183183
dashboard.id.toString() === boardId &&
184184
"bg-[var(--color-violet8)] text-[var(--color-black)] font-semibold rounded-l-xl"
185185
)}
186186
>
187187
<Link
188188
href={`/dashboard/${dashboard.id}`}
189-
className="flex items-center gap-2"
189+
className="flex items-center gap-3"
190190
>
191191
<svg
192192
xmlns="http://www.w3.org/2000/svg"
@@ -199,8 +199,8 @@ export default function SideMenu({
199199
<circle cx="4" cy="4" r="4" />
200200
</svg>
201201
{!isCollapsed && (
202-
<div className="hidden md:flex items-center gap-2">
203-
<span className="truncate md:text-base">
202+
<div className="hidden md:flex min-w-0 items-center gap-1.5">
203+
<span className="truncate md:text-base max-w-[100px] lg:max-w-[200px]">
204204
{dashboard.title}
205205
</span>
206206
{dashboard.createdByMe && (
@@ -223,7 +223,7 @@ export default function SideMenu({
223223

224224
{/* 페이지네이션 */}
225225
{!isCollapsed && dashboardList.length > itemsPerPage && (
226-
<div className="flex justify-start mt-4 px-3">
226+
<div className="flex justify-start items-end mb-9 px-2">
227227
<PaginationButton
228228
direction="left"
229229
disabled={currentPage === 1}

src/components/table/invited/InvitedDashBoard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ export default function InvitedDashBoard() {
277277
<div className="relative bg-white rounded-lg shadow-md w-[260px] sm:w-[504px] lg:w-[1022px] h-[770px] sm:h-[592px] lg:h-[620px] max-w-none">
278278
<div className="flex flex-col p-6 w-full h-[104px]">
279279
<div className="flex flex-col w-full sm:w-[448px] lg:w-[966px] gap-[24px]">
280-
<p className="text-black3 text-xl sm:text-2xl font-bold">
280+
<p className="text-black3 text-[16px] sm:text-[20px] font-bold">
281281
초대받은 대시보드
282282
</p>
283283

src/pages/dashboard/[dashboardId]/edit.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export default function EditDashboard() {
7070

7171
<div
7272
className="overflow-auto flex-1 px-[20px] pt-[10px] pb-10"
73-
style={{ backgroundColor: "var(--color-gray5)" }}
73+
style={{ backgroundColor: "#F5F2FC" }}
7474
>
7575
<div className="mt-6">
7676
<button

src/pages/dashboard/[dashboardId]/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export default function Dashboard() {
111111
<div className="flex flex-col flex-1 overflow-hidden">
112112
<HeaderDashboard variant="dashboard" dashboardId={dashboardId} />
113113

114-
<div className="flex-1 overflow-x-auto flex flex-col md:flex-col lg:flex-row bg-gray-50 ">
114+
<div className="flex-1 overflow-x-auto flex flex-col md:flex-col lg:flex-row bg-white">
115115
{/* 각 칼럼 렌더링 */}
116116
{columns.map((col) => (
117117
<Column
@@ -123,7 +123,7 @@ export default function Dashboard() {
123123
/>
124124
))}
125125
{/* ColumnsButton: 모바일/태블릿에서는 하단 고정, 데스크탑에서는 원래 위치 */}
126-
<div className={`p-11 hidden lg:block bg-gray-50`}>
126+
<div className={`p-11 hidden lg:block bg-white`}>
127127
<ColumnsButton onClick={openModal} />
128128
</div>
129129

src/pages/mydashboard.tsx

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ export default function MyDashboardPage() {
144144
onToggleEditMode={() => setIsEditMode((prev) => !prev)}
145145
/>
146146

147-
<main className="flex-col overflow-auto px-[25px] pt-[40px] pb-10 bg-[#f9f9f9] ">
147+
<main className="flex-col overflow-auto px-[25px] py-5 sm:py-10 bg-[#F5F2FC]">
148148
{/* 검색 입력창 */}
149149
<section className="w-full overflow-hidden transition-all">
150-
<div className="min-w-0 w-full max-w-[260px] md:max-w-[247px] lg:max-w-[332px]">
150+
<div className="min-w-0 w-full max-w-[260px] md:max-w-[247px] lg:max-w-[332px] mb-3">
151151
<div className="relative flex items-center justify-end">
152152
<input
153153
type="text"
@@ -161,23 +161,23 @@ export default function MyDashboardPage() {
161161
/>
162162
<Search
163163
size={18}
164-
color="#989a98"
164+
color="#333236"
165165
className="absolute right-4"
166166
/>
167167
</div>
168168
</div>
169169
</section>
170170

171-
{/* 카드 영역 */}
172171
<section className="w-full max-w-[260px] sm:max-w-[504px] lg:max-w-[1022px]">
173-
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 py-2">
172+
{/* 카드 영역 */}
173+
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-[8px] md:gap-[10px] lg:gap-[13px]">
174174
{currentItems.map((item, index) => (
175175
<div key={index}>{item}</div>
176176
))}
177177
</div>
178178
{totalPages > 1 && (
179-
<div className="w-full flex justify-end items-center mt-1.5">
180-
<span className="font-14r text-black3 px-[8px] whitespace-nowrap">
179+
<div className="w-full flex justify-end items-center mt-3">
180+
<span className="text-[12px] sm:text-[14px] text-black3 px-[8px] whitespace-nowrap">
181181
{`${totalPages} 페이지 중 ${currentPage}`}
182182
</span>
183183
<PaginationButton
@@ -192,11 +192,8 @@ export default function MyDashboardPage() {
192192
/>
193193
</div>
194194
)}
195-
</section>
196-
197-
{/* 초대받은 대시보드 */}
198-
<section className="w-full">
199-
<div className="mt-[50px]">
195+
{/* 초대받은 대시보드 */}
196+
<div className="mt-[25px]">
200197
<InvitedDashBoard />
201198
</div>
202199
</section>

src/pages/mypage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default function MyPage() {
4141
dashboardList={dashboards}
4242
onCreateDashboard={() => fetchDashboards()}
4343
/>
44-
<div className="flex flex-col flex-1 overflow-hidden bg-[var(--color-gray5)]">
44+
<div className="flex flex-col flex-1 overflow-hidden bg-[#F5F2FC]">
4545
<HeaderMyPage variant="mypage" />
4646
<div className="flex flex-col justify-start overflow-auto w-full px-6 mt-6">
4747
{/*돌아가기 버튼*/}

0 commit comments

Comments
 (0)