文档目录
聊天界面
无面板的消息历史 + 200×20 输入框。
- <Steve> 大家好多钻石!
- <Alex> 小心苦力怕
- Steve 加入了游戏
import { ChatScreen } from "./index";
/**
* ChatScreen 预览用例(规格 §6.3)
*/
export function ChatScreenDemo() {
return (
<ChatScreen
messages={[
{ author: "Steve", text: "大家好多钻石!" },
{ author: "Alex", text: "小心苦力怕" },
{ text: "Steve 加入了游戏" },
]}
/>
);
}
安装
CLI 拷贝
$npx shadcn add @tennantite/chat-screennpm 直装
$pnpm add @tennantite/uinpm 方式安装编译产物;需要改造源码请用上方的 CLI 拷贝安装。
源码
packages/ui/src/screens/menus/chat-screen/index.tsxnpm 包保留源码目录,可直接复制改造。