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
+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"