diff --git a/assets/icons/ic_delete.svg b/assets/icons/ic_delete.svg new file mode 100644 index 00000000..a9547403 --- /dev/null +++ b/assets/icons/ic_delete.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icons/ic_kebab.svg b/assets/icons/ic_kebab.svg new file mode 100644 index 00000000..dd7ed7f5 --- /dev/null +++ b/assets/icons/ic_kebab.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/icons/ic_plus.png b/assets/icons/ic_plus.png new file mode 100644 index 00000000..0fae225f Binary files /dev/null and b/assets/icons/ic_plus.png differ diff --git a/assets/icons/slash.svg b/assets/icons/slash.svg new file mode 100644 index 00000000..109b9312 --- /dev/null +++ b/assets/icons/slash.svg @@ -0,0 +1,3 @@ + + + diff --git a/components/Header/MenuTab/index.tsx b/components/Header/MenuTab/index.tsx index 20a81f05..82d54683 100644 --- a/components/Header/MenuTab/index.tsx +++ b/components/Header/MenuTab/index.tsx @@ -9,9 +9,9 @@ export default function MenuTab() { return ( <> { + setFormState({ + ...formState, + [e.target.name]: e.target.value, + }); + }; + + const handleChange = (e) => { + const nextValue = e.target.files[0]; + setValue(nextValue); + }; + + const handleImageClick = () => { + fileInputRef.current.click(); + }; + + const handleCancelClick = () => { + setPreview(null); + setValue(null); + fileInputRef.current.value = ""; + }; + + useEffect(() => { + if (!value) return; + + const nextPreview = URL.createObjectURL(value); + setPreview(nextPreview); + return () => URL.revokeObjectURL(nextPreview); + }, [value]); + + const isFormValid = formState.title && formState.contents; + + return ( +
+
+

게시글 쓰기

+ +
+
+
+
+ + +
+
+ +