feat: improve ux with autoscroll to end, closer to styling guidelines

This commit is contained in:
Alexander Daichendt 2025-02-12 12:50:43 +01:00
parent 1bcf2fc177
commit 97f0483f9a
4 changed files with 37 additions and 18 deletions

View file

@ -17,18 +17,13 @@ function ChatInput({ onSendMessage }: ChatInputProps) {
return (
<form onSubmit={handleSubmit} className="mt-4">
<div className="flex gap-2">
<input
type="text"
value={message}
onChange={(e) => setMessage(e.target.value)}
placeholder="Type a message..."
className="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
/>
<button type="submit" disabled={!message.trim()} className="btn">
Send
</button>
</div>
<input
type="text"
value={message}
onChange={(e) => setMessage(e.target.value)}
placeholder="Message"
className="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
/>
</form>
);
}