25 lines
918 B
TypeScript
25 lines
918 B
TypeScript
"use client";
|
|
import { useState } from "react";
|
|
import { Input } from "@/components/ui/Input";
|
|
import { Button } from "@/components/ui/Button";
|
|
|
|
export default function NoteEditorPage() {
|
|
const [title, setTitle] = useState("");
|
|
const [content, setContent] = useState("");
|
|
|
|
return (
|
|
<div className="space-y-4">
|
|
<div className="flex items-center justify-between">
|
|
<h1 className="text-xl font-bold text-gray-800">编辑笔记</h1>
|
|
<Button variant="primary" size="sm">保存</Button>
|
|
</div>
|
|
<Input value={title} onChange={e => setTitle(e.target.value)} placeholder="笔记标题" className="text-lg font-medium border-0 px-0" />
|
|
<textarea
|
|
value={content}
|
|
onChange={e => setContent(e.target.value)}
|
|
placeholder="开始记录..."
|
|
className="w-full min-h-[300px] text-sm text-gray-700 resize-none focus:outline-none"
|
|
/>
|
|
</div>
|
|
);
|
|
} |