Skip to content

Commit 80de211

Browse files
committed
feat: 버튼 섹션 구현
1 parent 470c8d1 commit 80de211

3 files changed

Lines changed: 25 additions & 2 deletions

File tree

app/(with-sidebar)/write/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import Editor from '@/components/write/Editor';
2+
import SaveButton from '@/components/write/SaveButton';
23

34
const Page = () => {
45
return (
5-
<div className="bg-background flex min-h-screen flex-col">
6+
<div className="bg-background flex min-h-screen flex-col gap-8">
67
<Editor />
8+
<SaveButton />
79
</div>
810
);
911
};

components/write/Editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const Editor = () => {
1919
<MDEditor
2020
value={value}
2121
onChange={(v) => setValue(v ?? '')}
22-
height={850}
22+
height={800}
2323
preview="live"
2424
textareaProps={{
2525
placeholder: '내용을 입력하세요',

components/write/SaveButton.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
const SaveButton = () => {
2+
return (
3+
<div className="mx-auto flex h-10 w-3xs gap-6">
4+
<button
5+
type="button"
6+
className="bg-primary flex-1 rounded-xl py-4 text-center text-base leading-0 font-semibold text-white shadow-sm transition hover:bg-violet-500 active:bg-violet-700 disabled:cursor-not-allowed disabled:opacity-60"
7+
>
8+
저장
9+
</button>
10+
11+
<button
12+
type="button"
13+
className="flex-1 rounded-xl border border-slate-300 bg-none py-4 text-center text-base leading-0 font-semibold text-slate-700 transition hover:bg-slate-200 active:bg-slate-300 disabled:cursor-not-allowed disabled:opacity-60"
14+
>
15+
취소하기
16+
</button>
17+
</div>
18+
);
19+
};
20+
21+
export default SaveButton;

0 commit comments

Comments
 (0)