style(chat): distinguish empty send button state

This commit is contained in:
2026-07-01 12:51:51 +08:00
parent eccb6d3074
commit abc0faf197
3 changed files with 12 additions and 1 deletions
@@ -60,6 +60,7 @@ export function ChatInputBar({ disabled = false }: ChatInputBarProps) {
/>
<ChatSendButton
disabled={disabled}
hasContent={hasContent}
onClick={handleSend}
/>
</div>
@@ -21,6 +21,12 @@
cursor: not-allowed;
}
.buttonEmpty {
background: #f8a8ce;
color: rgba(255, 255, 255, 0.88);
box-shadow: none;
}
.button:focus-visible,
.buttonActive {
background: linear-gradient(
+5 -1
View File
@@ -16,17 +16,21 @@ import styles from "./chat-send-button.module.css";
export interface ChatSendButtonProps {
disabled: boolean;
hasContent: boolean;
onClick: () => void;
}
export function ChatSendButton({
disabled,
hasContent,
onClick,
}: ChatSendButtonProps) {
return (
<button
type="button"
className={`${styles.button} ${disabled ? "" : styles.buttonActive}`}
className={`${styles.button} ${
hasContent && !disabled ? styles.buttonActive : styles.buttonEmpty
}`}
disabled={disabled}
onClick={onClick}
aria-label="Send message"