Skip to content

Commit 8d00c19

Browse files
authored
fix: 대본 열람 경고 모달 320수정 (#297)
1 parent 8bcd898 commit 8d00c19

File tree

3 files changed

+38
-7
lines changed

3 files changed

+38
-7
lines changed

src/components/post/postView/WarningModal.tsx

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import wargninIcon from "@/assets/image/post/ic_warning.svg";
22
import { useEffect } from "react";
3+
import useWindowDimensions from "@/hooks/useWindowDimensions";
34

45
interface WarningModalProps {
56
onClose: () => void;
@@ -12,22 +13,40 @@ const WarningModal = ({ onClose }: WarningModalProps) => {
1213
// document.body.style.overflow = "auto"; // 모달 닫히면 복구
1314
// };
1415
// }, []);
16+
17+
const { widthConditions } = useWindowDimensions();
18+
const { isSmallMobile } = widthConditions;
19+
1520
return (
1621
<div
17-
className="box-border fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 border border-[#2A2323] rounded-[30px] bg-[var(--grey1)] pdf-warning z-10 overflow-hidden "
22+
className={`box-border fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 border border-[#2A2323] rounded-[30px] bg-[var(--grey1)] pdf-warning z-10 overflow-hidden`}
1823
style={{
1924
boxShadow:
2025
"0 8px 24px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2)",
2126
}}
2227
>
23-
<div className="flex flex-row items-center justify-between box-border h-[35px] w-[340px] border bg-[#2A2323] px-[19px]">
24-
<div className="flex flex-row gap-[6px] items-center ">
28+
<div
29+
className={`flex flex-row items-center justify-between box-border border bg-[#2A2323] px-[19px] ${
30+
isSmallMobile ? "h-[35px] w-[235px]" : "h-[35px] w-[340px]"
31+
}`}
32+
>
33+
<div
34+
className={`flex flex-row gap-[6px] items-center ${
35+
isSmallMobile ? "gap-[4px]" : "gap-[6px]"
36+
}`}
37+
>
2538
<img
2639
src={wargninIcon}
2740
alt="경고 모달"
28-
className="w-[25px] h-[25px] object-contain"
41+
className={`object-contain ${
42+
isSmallMobile ? "w-[20px] h-[20px]" : "w-[25px] h-[25px]"
43+
}`}
2944
/>
30-
<span className="p-medium-medium text-[#FF5900] translate-y-[2px]">
45+
<span
46+
className={`text-[#FF5900] translate-y-[2px] ${
47+
isSmallMobile ? "p-small-medium" : "p-medium-medium"
48+
}`}
49+
>
3150
Warning
3251
</span>
3352
</div>
@@ -45,7 +64,11 @@ const WarningModal = ({ onClose }: WarningModalProps) => {
4564
</button>
4665
</div>
4766

48-
<p className="p-small-medium text-center mt-[22px]">
67+
<p
68+
className={`text-center mt-[22px] ${
69+
isSmallMobile ? "p-12-medium" : "p-small-medium"
70+
}`}
71+
>
4972
작품을 무단 복사하거나 <br />
5073
불법 게재 등의 방법으로 악용 시 <br />
5174
민사 및 형사 책임의 대상이 됩니다.

src/pages/work/PostView.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
height: 138px;
1717

1818
@include r.media-small-mobile {
19-
width: 73.4%;
19+
width: 235px;
2020
aspect-ratio: 235 / 126;
2121
}
2222
}

src/styles/text.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,14 @@
242242
line-height: 16px; /* 133.333% */
243243
}
244244

245+
.p-12-medium {
246+
font-family: Pretendard;
247+
font-size: 12px;
248+
font-style: normal;
249+
font-weight: 400;
250+
line-height: 16px; /* 133.333% */
251+
}
252+
245253
.t-align-start,
246254
.t-start {
247255
text-align: start;

0 commit comments

Comments
 (0)