Skip to content

Commit 2138b8e

Browse files
Merge branch 'main' into SCRUM-81-박찬영
2 parents 23a2e22 + 9942692 commit 2138b8e

File tree

12 files changed

+301
-320
lines changed

12 files changed

+301
-320
lines changed

src/components/common/Input/Input/Input.jsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ export const Bone = styled.div`
1616
width: 100%;
1717
max-width: 720px;
1818
19-
@media (max-width: 768px) {
20-
padding: 0;
21-
}
22-
23-
@media (max-width: 360px) {
19+
@media (max-width: 767px) {
2420
padding: 0;
2521
}
2622
`;
@@ -32,6 +28,9 @@ const Picker = styled.div`
3228
const ButtonWrapper = styled.div`
3329
display: flex;
3430
justify-content: center;
31+
@media (max-width: 767px) {
32+
margin-top: auto;
33+
}
3534
`
3635

3736
// To 전체적인 컴포넌

src/components/common/Input/Picker/ColorPicker.jsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ const Bone = styled.div`
88
gap: 12px;
99
flex-wrap: wrap;
1010
margin: 45px 0;
11-
@media (max-width: 768px) {
12-
justify-content: flex-start;
11+
@media (max-width: 767px) {
12+
display: grid;
13+
grid-template: 1fr 1fr / 1fr 1fr;
14+
width: fit-content;
1315
}
1416
`;
1517

@@ -24,7 +26,7 @@ const Color = styled.div`
2426
justify-content: center;
2527
position: relative;
2628
background-color: ${(props) => props.color};
27-
@media (max-width: 768px) {
29+
@media (max-width: 767px) {
2830
width: 154px;
2931
height: 154px;
3032
}

src/components/common/Input/Picker/ImgPicker.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ const Bone = styled.div`
99
gap: 12px;
1010
flex-wrap: wrap;
1111
margin: 45px 0;
12-
@media (max-width: 768px) {
13-
justify-content: flex-start;
12+
@media (max-width: 767px) {
13+
display: grid;
14+
grid-template: 1fr 1fr / 1fr 1fr;
15+
width: fit-content;
1416
}
1517
`;
1618

src/components/common/Input/ProfileInput/ProfileInputChoiceImage.jsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const Bone = styled.div`
1010
margin: 3.125rem auto 3.125rem auto;
1111
width: 44.813rem;
1212
height: auto;
13-
@media (max-width: 768px) {
13+
@media (max-width: 1199px) {
1414
width: auto;
1515
}
1616
`;
@@ -34,10 +34,10 @@ const ProfileImg = styled.img`
3434
height: 5rem;
3535
margin-right: 2rem;
3636
border-radius: 50%;
37-
@media (max-width: 768px) {
37+
@media (max-width: 1199px) {
3838
margin-right: 1.76rem;
3939
}
40-
@media (max-width: 360px) {
40+
@media (max-width: 767px) {
4141
margin-right: 1.5rem;
4242
}
4343
`;
@@ -53,7 +53,7 @@ const ProfileImgChoice = styled.div`
5353
width: 37.813rem;
5454
height: 3.5rem;
5555
margin: 0.75rem 0 0 0;
56-
@media (max-width: 768px) {
56+
@media (max-width: 1199px) {
5757
display: flex;
5858
align-items: center;
5959
margin: 0.75rem 0 0 0;
@@ -63,6 +63,10 @@ const ProfileImgChoice = styled.div`
6363
width: auto;
6464
height: auto;
6565
}
66+
@media (max-width: 767px) {
67+
display: grid;
68+
grid-template: 1fr 1fr / 1fr 1fr 1fr 1fr 1fr;
69+
}
6670
`;
6771

6872
const Image = styled.div.withConfig({
@@ -83,7 +87,7 @@ const Image = styled.div.withConfig({
8387
props.selected
8488
? "0 0 5px rgba(0, 162, 254, 0.5)"
8589
: "none"}; /* 선택 시 box-shadow 추가 */
86-
@media (max-width: 360px) {
90+
@media (max-width: 767px) {
8791
width: 40px;
8892
height: 40px;
8993
}

src/components/domain/rollingpaper/Card/CardWrite.jsx

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from "react";
1+
import React, { useState, useEffect } from "react";
22
import styled from "styled-components";
33
import IconButton from "../../../common/Button/IconButton";
44
import { textStyle } from "../../../../styles/textStyle";
@@ -85,6 +85,16 @@ const CardContainer = styled.div`
8585
transform: scale(0.97);
8686
box-shadow: 0px 1px 8px rgba(0, 0, 0, 0.1);
8787
}
88+
@media (max-width: 767px) {
89+
&:hover {
90+
transform: none;
91+
box-shadow: none;
92+
}
93+
&:active {
94+
transform: none;
95+
box-shadow: none;
96+
}
97+
}
8898
`;
8999

90100
const Header = styled.div`
@@ -146,9 +156,22 @@ const ProfileWrap = styled.div`
146156

147157
const CardWrite = ({ message, onDelete }) => {
148158
const [isModalOpen, setIsModalOpen] = useState(false);
159+
const [isMobile, setIsMobile] = useState(window.innerWidth <= 767);
160+
161+
useEffect(() => {
162+
const handleResize = () => {
163+
setIsMobile(window.innerWidth <= 768);
164+
};
165+
166+
window.addEventListener("resize", handleResize);
167+
return () => window.removeEventListener("resize", handleResize);
168+
}, []);
169+
149170
const handleCardClick = () => {
171+
if (!isMobile) { // 모바일이 아닐 때만 모달 실행
150172
setIsModalOpen(true);
151-
};
173+
}
174+
};
152175

153176
const handleCloseModal = () => {
154177
setIsModalOpen(false);

0 commit comments

Comments
 (0)