Skip to content

Commit 6efd0b4

Browse files
committed
design:편지 작성 페이지 레이아웃 관련 수정
1 parent 2562d7c commit 6efd0b4

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

src/pages/Write/CategorySelect.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default function CategorySelect({
1919
const stamp = useWrite((state) => state.stamp);
2020
return (
2121
<>
22-
<div className="flex h-full min-h-[calc(100vh-40px)] w-full flex-col items-center">
22+
<div className="flex w-full grow flex-col items-center">
2323
<div className="absolute right-5">
2424
{!send && !prevLetter && (
2525
<WritePageButton

src/pages/Write/LetterEditor.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ export default function LetterEditor({
2323
const letterText = useWrite((state) => state.letterText);
2424
const setLetterText = useWrite((state) => state.setLetterText);
2525

26-
const editorStyle = twMerge(`body-r basic-theme w-full px-6 focus:outline-none`, `${font}`);
27-
2826
const handleResizeHeight = () => {
2927
if (textareaRef.current !== null) {
3028
textareaRef.current.style.height = 'auto'; //height 초기화
@@ -33,7 +31,7 @@ export default function LetterEditor({
3331
};
3432

3533
return (
36-
<div className="mb-12">
34+
<div className="flex grow flex-col pb-15">
3735
<OptionSlide prevLetter={prevLetter} />
3836
<div className="absolute right-5">
3937
{prevLetter ? (
@@ -72,10 +70,12 @@ export default function LetterEditor({
7270
value={letterTitle}
7371
/>
7472
</div>
75-
<div className="mt-9">
73+
<div className="mt-9 flex grow">
7674
<textarea
77-
rows={18}
78-
className={editorStyle}
75+
className={twMerge(
76+
`body-r basic-theme min-h-full w-full px-6 focus:outline-none`,
77+
`${font}`,
78+
)}
7979
placeholder="클릭해서 내용을 작성하세요"
8080
onChange={(e) => {
8181
handleResizeHeight();

src/pages/Write/components/ResultLetterAnimation.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default function ResultLetterAnimation({ stampName }: { stampName: Stamp
2828
) : (
2929
<>
3030
{next === 'st' && (
31-
<div className="relative h-[400px] w-full overflow-hidden">
31+
<div className="relative h-[300px] w-full overflow-hidden">
3232
<img
3333
src={openedLetter}
3434
alt="열린 편지"
@@ -43,7 +43,7 @@ export default function ResultLetterAnimation({ stampName }: { stampName: Stamp
4343
</div>
4444
)}
4545
{next === 'nd' && (
46-
<div className="relative h-[400px] w-full">
46+
<div className="relative h-[300px] w-full">
4747
<img
4848
src={closedLetter}
4949
alt="닫힌 편지"

src/pages/Write/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ const WritePage = () => {
2020
text: '요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민요롷고그런그런 고민',
2121
},
2222
]);
23-
// useEffect(() => {
24-
// setPrevLetter(null);
25-
// });
23+
useEffect(() => {
24+
setPrevLetter(null);
25+
});
2626

2727
const theme = useWrite((state) => state.theme);
2828

2929
const wrapStyle = twMerge(
30-
'relative h-full min-h-screen w-full p-5',
30+
'relative p-5 w-full grow flex flex-col',
3131
`${step === 'edit' && THEME_OBJ[theme]}`,
3232
);
3333
return (

src/styles/animations.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111
transform: translateY(-300%);
1212
}
1313
100% {
14-
transform: translateY(60%);
14+
transform: translateY(35%);
1515
}
1616
}
1717

1818
@keyframes up {
1919
0% {
20-
transform: perspective(800px) rotateY(0deg) translateY(200px);
20+
transform: perspective(800px) rotateY(0deg) translateY(100px);
2121
opacity: 0;
2222
}
2323
20% {
24-
transform: perspective(800px) rotateY(0deg) translateY(200px);
24+
transform: perspective(800px) rotateY(0deg) translateY(100px);
2525
opacity: 1;
2626
}
2727
66% {

0 commit comments

Comments
 (0)