fix(chat): align input area elements vertically centered
- Change flex container from items-end to items-center - Use top-1/2 -translate-y-1/2 for send button vertical centering - Adjust paperclip button padding for consistent sizing Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
3d120e1ce3
commit
5ff53b8ba7
|
|
@ -280,13 +280,13 @@ export function InputArea({
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* 输入区域 */}
|
{/* 输入区域 */}
|
||||||
<div className="flex items-end gap-3">
|
<div className="flex items-center gap-3">
|
||||||
{/* 文件上传按钮 */}
|
{/* 文件上传按钮 */}
|
||||||
<button
|
<button
|
||||||
onClick={openFilePicker}
|
onClick={openFilePicker}
|
||||||
disabled={disabled || isUploading}
|
disabled={disabled || isUploading}
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'p-3 rounded-xl transition-all',
|
'p-2.5 rounded-xl transition-all flex-shrink-0',
|
||||||
disabled || isUploading
|
disabled || isUploading
|
||||||
? 'bg-secondary-100 text-secondary-400 cursor-not-allowed'
|
? 'bg-secondary-100 text-secondary-400 cursor-not-allowed'
|
||||||
: 'bg-secondary-100 text-secondary-600 hover:bg-secondary-200',
|
: 'bg-secondary-100 text-secondary-600 hover:bg-secondary-200',
|
||||||
|
|
@ -333,7 +333,7 @@ export function InputArea({
|
||||||
onClick={handleSubmit}
|
onClick={handleSubmit}
|
||||||
disabled={disabled || isUploading || (!message.trim() && pendingFiles.length === 0)}
|
disabled={disabled || isUploading || (!message.trim() && pendingFiles.length === 0)}
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'absolute right-2 bottom-2 p-2 rounded-lg transition-all',
|
'absolute right-2 top-1/2 -translate-y-1/2 p-2 rounded-lg transition-all',
|
||||||
(message.trim() || pendingFiles.length > 0) && !disabled && !isUploading
|
(message.trim() || pendingFiles.length > 0) && !disabled && !isUploading
|
||||||
? 'bg-primary-600 text-white hover:bg-primary-700'
|
? 'bg-primary-600 text-white hover:bg-primary-700'
|
||||||
: 'bg-secondary-100 text-secondary-400 cursor-not-allowed',
|
: 'bg-secondary-100 text-secondary-400 cursor-not-allowed',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue