Skip to content

Commit 292a07e

Browse files
authored
Merge pull request #15 from codeit9-temporary/feature/favorite
Design: Layout 분리 및 즐겨찾기 페이지 UI 구현
2 parents b8f4cd4 + cfe2046 commit 292a07e

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed

components/Layout/CardsLayout.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from "react";
2+
3+
interface CardsLayoutProps {
4+
children: React.ReactNode;
5+
}
6+
7+
const CardsLayout = ({ children }: CardsLayoutProps) => {
8+
return (
9+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5 md:gap-6 lg:gap-[10px] w-full">
10+
{children}
11+
</div>
12+
);
13+
};
14+
15+
export default CardsLayout;
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from "react";
2+
3+
interface ContentLayoutProps {
4+
children: React.ReactNode;
5+
}
6+
7+
const ContentLayout = ({ children }: ContentLayoutProps) => {
8+
return (
9+
<div className="w-full max-w-[1125px] mx-auto p-[10px] md:p-10 px-[32.5px]">
10+
{children}
11+
</div>
12+
);
13+
};
14+
15+
export default ContentLayout;

pages/favorite/index.tsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import CardsLayout from "@/components/Layout/CardsLayout";
2+
import ContentLayout from "@/components/Layout/ContentLayout";
3+
4+
const Favorite = () => {
5+
return (
6+
<>
7+
<div className="page-title pt-[10px] md:pt-5 pb-10 md:pb-[60px] bg-gray100 text-center">
8+
<h2 className="text-[32px] md:text-[40px] font-semibold">
9+
⭐️ 즐겨찾기
10+
</h2>
11+
</div>
12+
<ContentLayout>
13+
<CardsLayout>
14+
{/* 카드 공통 컴포넌트로 구현 예정 */}
15+
<div className="border border-red-800">card</div>
16+
<div className="border border-red-800">card</div>
17+
<div className="border border-red-800">card</div>
18+
<div className="border border-red-800">card</div>
19+
<div className="border border-red-800">card</div>
20+
<div className="border border-red-800">card</div>
21+
</CardsLayout>
22+
</ContentLayout>
23+
</>
24+
);
25+
};
26+
27+
export default Favorite;

0 commit comments

Comments
 (0)