feat: 添加评论功能,包括评论输入、评论列表和评论项组件,支持层级深度和私密评论

This commit is contained in:
2025-07-31 08:03:19 +08:00
parent 92c2a58e80
commit 94aa4f1b1f
23 changed files with 303 additions and 53 deletions

View File

@ -0,0 +1,25 @@
"use client";
import { Textarea } from "@/components/ui/textarea"
import Gravatar from "@/components/common/gravatar"
export function CommentInput() {
return (
<div>
<div className="flex py-4">
{/* Avatar */}
<div>
<Gravatar email="snowykami@outlook.com" className="w-10 h-10 rounded-full" />
</div>
{/* Input Area */}
<div className="flex-1 pl-2">
<Textarea placeholder="写下你的评论..." className="w-full p-2 border border-gray-300 rounded-md" />
</div>
</div>
<div className="flex justify-end">
<button className="px-2 py-1 bg-blue-500 text-white rounded-md hover:bg-blue-600 transition-colors">
</button>
</div>
</div>
);
}