Files
memind/src/components/SpaceChatFab.tsx
T
John 2e14873f2d Initial commit: Memind H5 portal with MindSpace, Plaza, and agent jobs.
Track application source and tests; exclude local env, user workspaces, and runtime data via .gitignore.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 15:04:43 -07:00

27 lines
668 B
TypeScript

import { TKMindAvatar } from './TKMindAvatar';
export function SpaceChatFab({
open,
streaming,
pendingTool,
onClick,
}: {
open: boolean;
streaming: boolean;
pendingTool: boolean;
onClick: () => void;
}) {
return (
<button
type="button"
className={`space-chat-fab${open ? ' is-open' : ''}${streaming ? ' is-streaming' : ''}${pendingTool ? ' has-pending-tool' : ''}`}
aria-label={open ? '关闭 Agent 对话' : '打开 Agent 对话'}
aria-expanded={open}
onClick={onClick}
>
<TKMindAvatar size="sm" />
{pendingTool && <span className="space-chat-fab-badge" aria-hidden="true" />}
</button>
);
}