mirror of
https://github.com/codeaashu/claude-code.git
synced 2026-04-08 22:28:48 +03:00
claude-code
This commit is contained in:
26
web/components/mobile/MobileInput.tsx
Normal file
26
web/components/mobile/MobileInput.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
"use client";
|
||||
|
||||
import { ChatInput } from "@/components/chat/ChatInput";
|
||||
|
||||
interface MobileInputProps {
|
||||
conversationId: string;
|
||||
/** Height of the software keyboard in px — shifts input above it */
|
||||
keyboardHeight: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mobile-optimised chat input wrapper.
|
||||
* Uses a paddingBottom equal to the keyboard height so the input floats
|
||||
* above the virtual keyboard without relying on position:fixed (which
|
||||
* breaks on iOS Safari when the keyboard is open).
|
||||
*/
|
||||
export function MobileInput({ conversationId, keyboardHeight }: MobileInputProps) {
|
||||
return (
|
||||
<div
|
||||
style={{ paddingBottom: keyboardHeight }}
|
||||
className="transition-[padding] duration-100"
|
||||
>
|
||||
<ChatInput conversationId={conversationId} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user