Skip to content

Commit 2ae23ce

Browse files
feat: MDEditor 입력 스타일 이슈
1 parent fe66d87 commit 2ae23ce

File tree

1 file changed

+17
-29
lines changed
  • fundamentals/today-i-learned/src/pages/timeline/components

1 file changed

+17
-29
lines changed

fundamentals/today-i-learned/src/pages/timeline/components/PostInput.tsx

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
import { css } from "@styled-system/css";
2+
import MDEditor from "@uiw/react-md-editor";
13
import * as React from "react";
4+
import type { GitHubAuthor } from "@/api/remote/discussions";
25
import { Avatar } from "@/components/shared/ui/Avatar";
36
import { Button } from "@/components/shared/ui/Button";
47
import { Input } from "@/components/shared/ui/Input";
5-
import MDEditor from "@uiw/react-md-editor";
6-
import type { GitHubAuthor } from "@/api/remote/discussions";
7-
import { css } from "@styled-system/css";
88

99
interface PostInputProps {
1010
user: GitHubAuthor;
@@ -81,21 +81,20 @@ export function PostInput({
8181
className={titleInputStyle}
8282
/>
8383
<div className={editorWrapper} data-color-mode="light">
84-
<div className={editorContainer}>
85-
<MDEditor
86-
value={content}
87-
onChange={handleContentChange}
88-
preview="edit"
89-
hideToolbar={true}
90-
visibleDragbar={false}
91-
textareaProps={{
92-
placeholder:
93-
"작은 기록이 모여 큰 성장이 됩니다.\nTIL은 Frontend Fundamentals Discussion에 여러분의 GitHub 계정으로 저장돼요.\n하루에 한 줄씩, 함께 성장해봐요.",
94-
style: { backgroundColor: "red !important" }
95-
}}
96-
height={editorHeight}
97-
/>
98-
</div>
84+
<MDEditor
85+
value={content}
86+
style={{ boxShadow: "none" }}
87+
onChange={handleContentChange}
88+
preview="edit"
89+
hideToolbar={true}
90+
visibleDragbar={false}
91+
textareaProps={{
92+
placeholder:
93+
"작은 기록이 모여 큰 성장이 됩니다.\nTIL은 Frontend Fundamentals Discussion에 여러분의 GitHub 계정으로 저장돼요.\n하루에 한 줄씩, 함께 성장해봐요.",
94+
style: { backgroundColor: "red !important" }
95+
}}
96+
height={editorHeight}
97+
/>
9998
</div>
10099
</div>
101100
</div>
@@ -220,17 +219,6 @@ const editorWrapper = css({
220219
width: "100%"
221220
});
222221

223-
const editorContainer = css({
224-
"& .w-md-editor": {
225-
border: "none !important",
226-
boxShadow: "none !important"
227-
},
228-
"& .w-md-editor-text": {
229-
padding: "0 !important",
230-
height: "full"
231-
}
232-
});
233-
234222
// Action Area
235223
const actionArea = css({
236224
display: "flex",

0 commit comments

Comments
 (0)