Skip to content

Commit de0f033

Browse files
authored
Merge pull request #56 from MBTips/feature/Home-페이지-컴포넌트-반응형-추가
Feature/home 페이지 컴포넌트 반응형 추가
2 parents 4054511 + 1379769 commit de0f033

File tree

12 files changed

+168
-71
lines changed

12 files changed

+168
-71
lines changed

.prettierrc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,12 @@
88
"trailingComma": "none",
99
"printWidth": 80,
1010
"arrowParens": "always",
11-
"endOfLine": "auto"
11+
"endOfLine": "auto",
12+
13+
"plugins": ["prettier-plugin-tailwindcss"],
14+
"tailwindStylesheet": "./src/index.css",
15+
"tailwindConfig": "./tailwind.config.ts",
16+
"tailwindFunctions": ["clsx", "cn", "tw"],
17+
"tailwindPreserveWhitespace": true,
18+
"tailwindPreserveDuplicates": false
1219
}

package-lock.json

Lines changed: 84 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"eslint-plugin-react-hooks": "^5.0.0",
3030
"eslint-plugin-react-refresh": "^0.4.16",
3131
"globals": "^15.14.0",
32-
"prettier": "^3.4.2",
32+
"prettier": "^3.5.3",
33+
"prettier-plugin-tailwindcss": "^0.6.11",
3334
"typescript": "~5.6.2",
3435
"typescript-eslint": "^8.22.0",
3536
"vite": "^6.0.5"

public/image/home_banner_lg_3.png

48.8 KB
Loading

src/components/Banner.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const Banner = () => {
3131
}, []);
3232

3333
return (
34-
<div className="relative flex w-full h-[184px]">
34+
<div className="relative flex h-[184px] w-full">
3535
{images.map((image, index) => (
3636
// a -> Link로 바꿀 예정
3737
<a href={`/contents/${index}`}>
@@ -46,7 +46,7 @@ const Banner = () => {
4646
/>
4747
</a>
4848
))}
49-
<div className="right-[20px] bottom-[12px] absolute">
49+
<div className="absolute right-[20px] bottom-[12px]">
5050
<Indicator order={order} setOrder={setOrder} />
5151
</div>
5252
</div>

src/components/NavBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const NavBar = () => {
22
return (
3-
<div className="flex flex-row items-center justify-center w-[500px] h-[56px]">
3+
<div className="flex h-[56px] w-full justify-between">
44
<img
55
src="/public/icon/mbtipslogo.svg"
66
alt="Logo"

src/components/StrokeBanner.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const StrokeBanner = () => {
22
return (
3-
<div className="flex flex-col justify-center px-[38px] py-6 border border-gray-200 border-dashed rounded-lg w-[335px] h-[178px] text-center">
3+
<div className="flex h-[178px] w-[320px] flex-col justify-center rounded-lg border border-dashed border-gray-200 px-[38px] py-6 text-center md:w-[335px] lg:w-[460px]">
44
{/* "상대방 정보 선택" 페이지 생성되면되면 Link로 쓸 예정*/}
55
<a href="/setting-friends">
66
<img
@@ -11,10 +11,10 @@ const StrokeBanner = () => {
1111
height={40}
1212
/>
1313
</a>
14-
<strong className="mt-4 font-bold text-4 text-gray-900">
14+
<strong className="text-4 mt-4 font-bold text-gray-900">
1515
친구 정보를 저장하고 대화할 수 있어요
1616
</strong>
17-
<p className="mt-2 font-light text-gray-900 text-sm">
17+
<p className="mt-2 text-sm font-light text-gray-900">
1818
로그인 시 기억하고 싶은 친구의 MBTI와 특징을 입력해서 빠르게 대화할 수
1919
있어요
2020
</p>

src/components/SubTitle.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,19 @@ const SubTitle = ({ mode }: { mode: "빠른대화" | "친구목록" }) => {
1616

1717
return (
1818
<div className="flex items-center">
19-
<h2 className="font-bold text-gray-900 text-xl">
19+
<h2 className="text-xl font-bold text-gray-900">
2020
{titleList[mode].title}
2121
</h2>
22-
<p className="ml-1.5 font-light text-md">{titleList[mode].description}</p>
22+
<p className="ml-1.5 flex-1 text-sm font-light text-gray-800">
23+
{titleList[mode].description}
24+
</p>
2325
{mode === "친구목록" && (
2426
<button onClick={() => navigate("/setting-friends")}>
2527
<img
26-
className="ml-[78px]"
2728
src="/icon/plus.svg"
2829
alt="친구 추가 버튼"
29-
width={14}
30-
height={14}
30+
width={20}
31+
height={20}
3132
/>
3233
</button>
3334
)}
Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
import PrimaryButton from "@/components/button/PrimaryButton";
1+
import { MouseEvent } from "react";
22

3-
const ChatStartButton = () => {
4-
return (
5-
<PrimaryButton size="md">
6-
대화 시작하기
7-
</PrimaryButton>
8-
)
9-
}
3+
const ChatStartButton = ({ onClick }: { onClick: (e: MouseEvent) => void }) => {
4+
return (
5+
<button
6+
className="flex h-[56px] w-[320px] items-center justify-center rounded-lg bg-primary-normal font-bold text-white md:w-[335px] lg:w-[460px]"
7+
onClick={onClick}
8+
>
9+
대화 시작하기
10+
</button>
11+
);
12+
};
1013

11-
export default ChatStartButton;
14+
export default ChatStartButton;

src/index.css

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,5 @@
11
@import "tailwindcss";
2-
3-
@theme {
4-
--color-primary-normal: #5C4AE8;
5-
--color-primary-light: #C8CDFF;
6-
--color-primary-pale: #EBEDFF;
7-
--color-secondary-normal: #ADE700;
8-
--color-secondary-light: #D3EF7F;
9-
--color-secondary-pale: #DEF599;
10-
--color-gray-50: #F0F2F5;
11-
--color-gray-100: #E6E8ED;
12-
--color-gray-200: #CFD4DB;
13-
--color-gray-300: #AEB4BD;
14-
--color-gray-400: #929AA4;
15-
--color-gray-500: #848C96;
16-
--color-gray-600: #585D65;
17-
--color-gray-700: #43474E;
18-
--color-gray-800: #353940;
19-
--color-gray-900: #2B2E33;
20-
--color-background: #D0D5DD;
21-
--color-foreground: #000000;
22-
23-
--text-2xl: 20px;
24-
--text-2xl--line-height: 30px;
25-
--text-xl: 18px;
26-
--text-xl--line-height: 27px;
27-
--text-2lg: 16px;
28-
--text-2lg--line-height: 24px;
29-
--text-lg: 14px;
30-
--text-lg--line-height: 21px;
31-
--text-md: 12px;
32-
--text-md--line-height: 18px;
33-
--text-sm: 10px;
34-
--text-sm--line-height: 15px;
35-
36-
—breakpoint-sm: 345px;
37-
—breakpoint-md: 375px;
38-
—breakpoint-lg: 500px;
39-
}
2+
@config "../tailwind.config.ts";
403

414
:root {
425
font-family: "Pretendard";

0 commit comments

Comments
 (0)