|
| 1 | +import { css } from "@styled-system/css"; |
| 2 | +import MDEditor from "@uiw/react-md-editor"; |
1 | 3 | import * as React from "react"; |
| 4 | +import type { GitHubAuthor } from "@/api/remote/discussions"; |
2 | 5 | import { Avatar } from "@/components/shared/ui/Avatar"; |
3 | 6 | import { Button } from "@/components/shared/ui/Button"; |
4 | 7 | 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"; |
8 | 8 |
|
9 | 9 | interface PostInputProps { |
10 | 10 | user: GitHubAuthor; |
@@ -81,21 +81,20 @@ export function PostInput({ |
81 | 81 | className={titleInputStyle} |
82 | 82 | /> |
83 | 83 | <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 | + /> |
99 | 98 | </div> |
100 | 99 | </div> |
101 | 100 | </div> |
@@ -220,17 +219,6 @@ const editorWrapper = css({ |
220 | 219 | width: "100%" |
221 | 220 | }); |
222 | 221 |
|
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 | | - |
234 | 222 | // Action Area |
235 | 223 | const actionArea = css({ |
236 | 224 | display: "flex", |
|
0 commit comments