diff --git a/app/components/button.module.scss b/app/components/button.module.scss index 88da97481..5b0bbe067 100644 --- a/app/components/button.module.scss +++ b/app/components/button.module.scss @@ -10,6 +10,14 @@ transition: all 0.3s ease; overflow: hidden; user-select: none; + outline: none; + border: none; + color: rgb(51, 51, 51); + + &[disabled] { + cursor: not-allowed; + opacity: 0.5; + } } .shadow { diff --git a/app/components/button.tsx b/app/components/button.tsx index 2e5707ae7..1675a4b7d 100644 --- a/app/components/button.tsx +++ b/app/components/button.tsx @@ -11,9 +11,10 @@ export function IconButton(props: { noDark?: boolean; className?: string; title?: string; + disabled?: boolean; }) { return ( -
{props.text}
)} -
+ ); } diff --git a/app/components/chat.tsx b/app/components/chat.tsx index a8b53fea3..b69209641 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -404,7 +404,6 @@ export function Chat(props: { // submit user input const onUserSubmit = () => { - if (userInput.length <= 0) return; setIsLoading(true); chatStore.onUserInput(userInput).then(() => setIsLoading(false)); setUserInput(""); @@ -680,6 +679,7 @@ export function Chat(props: { text={Locale.Chat.Send} className={styles["chat-input-send"]} noDark + disabled={!userInput} onClick={onUserSubmit} />