Skip to content

Commit f6e0292

Browse files
committed
fix(chat): theme-aware message composer on mobile
- Add bg-base-100 to composer root so input area follows light/dark theme - Add text-base-content to composer input and editor content for placeholder and typed text Made-with: Cursor
1 parent 185e15a commit f6e0292

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/webapp/src/components/chatroom/components/MessageComposer/components/Input/Input.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ export const Input = ({ className }: { className?: string }) => {
1414
}, [messageDraftMemory, editor])
1515

1616
return (
17-
<div className={twMerge('flex-1 px-1 py-2 text-base sm:px-2', className)} tabIndex={1}>
17+
<div
18+
className={twMerge('text-base-content flex-1 px-1 py-2 text-base sm:px-2', className)}
19+
tabIndex={1}>
1820
<EditorContent
1921
id="chatroom-editor"
2022
tabIndex={2}
2123
ref={editorRef}
2224
className={twMerge(
23-
'max-h-52 w-full overflow-auto wrap-anywhere break-all whitespace-pre-line transition-all duration-200 ease-in-out',
25+
'text-base-content max-h-52 w-full overflow-auto wrap-anywhere break-all whitespace-pre-line transition-all duration-200 ease-in-out',
2426
isEmojiOnly ? 'text-xl sm:text-2xl' : 'text-base'
2527
)}
2628
editor={editor}

packages/webapp/src/components/chatroom/components/MessageComposer/components/layouts/MobileLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const MobileToolbar = () => {
8484
export const MobileLayout = () => {
8585
return (
8686
<div className="chat_editor_container flex w-full flex-col">
87-
<MsgComposer className="border-base-300 rounded-t-md border border-b-0 shadow-sm">
87+
<MsgComposer className="bg-base-100 border-base-300 rounded-t-md border border-b-0 shadow-sm">
8888
<MsgComposer.MobileWrapper>
8989
<MsgComposer.Context>
9090
<MsgComposer.ReplyContext />

0 commit comments

Comments
 (0)