From 0be4985975fcd978eafd06ccb0a42b85b940bcbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Thu, 16 Jul 2026 12:12:47 +0800 Subject: [PATCH] adjust style --- .../home/components/RichInputArea/index.tsx | 9 ++-- .../src/view/home/index.tsx | 48 +++++++------------ 2 files changed, 22 insertions(+), 35 deletions(-) diff --git a/apps/ai-game-creator-shell/src/view/home/components/RichInputArea/index.tsx b/apps/ai-game-creator-shell/src/view/home/components/RichInputArea/index.tsx index 8f737440f..5b43eea18 100644 --- a/apps/ai-game-creator-shell/src/view/home/components/RichInputArea/index.tsx +++ b/apps/ai-game-creator-shell/src/view/home/components/RichInputArea/index.tsx @@ -21,7 +21,7 @@ import { PASTE_COMMAND, } from 'lexical'; import { Upload } from 'lucide-react'; -import { useEffect, useMemo, useRef } from 'react'; +import React, { useEffect, useMemo, useRef } from 'react'; import type { HomeAttachmentDraft, RichText } from '../../useHomeDraftStore'; import AttachmentContext from './attachmentContext'; @@ -38,6 +38,7 @@ type RichInputAreaProps = { onChange: (value: RichText[]) => void; onAttachmentsAdd: (attachments: HomeAttachmentDraft[]) => void; onAttachmentRemove: (attachmentId: string) => void; + children?: React.ReactNode; }; const INSERT_ATTACHMENTS_COMMAND: LexicalCommand = createCommand('INSERT_HOME_ATTACHMENTS_COMMAND'); @@ -207,7 +208,7 @@ function collectRichText(node: LexicalNode, parts: RichText[]) { } } -function UploadButton({ +export function UploadButton({ onAttachmentsAdd, }: Pick) { const [editor] = useLexicalComposerContext(); @@ -290,9 +291,7 @@ export default function RichInputArea(props: RichInputAreaProps) { } ErrorBoundary={LexicalErrorBoundary} /> -
- -
+ {props.children} ) { event.preventDefault(); const prompt = richTextToPrompt(homeRichText, homeAttachments); @@ -171,8 +158,9 @@ export default function HomeView({ ); })} + {status}
- -
- {status} - -
+ > +
+ + +
+