feat(chat): port chat widget components from Dart to React
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
"use client";
|
||||
/**
|
||||
* ChatSendButton 发送按钮
|
||||
*
|
||||
* 原始 Dart: lib/ui/chat/widgets/chat_send_button.dart(37 行)
|
||||
*
|
||||
* 视觉:
|
||||
* - 默认:粉色背景 + 渐变边缘
|
||||
* - 聚焦 / 激活:完整 primaryGradient(accent → 透明)
|
||||
*/
|
||||
import styles from "./chat-send-button.module.css";
|
||||
|
||||
export interface ChatSendButtonProps {
|
||||
disabled: boolean;
|
||||
onClick: () => void;
|
||||
}
|
||||
|
||||
export function ChatSendButton({ disabled, onClick }: ChatSendButtonProps) {
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
className={`${styles.button} ${disabled ? "" : styles.buttonActive}`}
|
||||
disabled={disabled}
|
||||
onClick={onClick}
|
||||
aria-label="Send message"
|
||||
>
|
||||
<span className={styles.icon} aria-hidden="true">
|
||||
↑
|
||||
</span>
|
||||
</button>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user