voice recognition trial 2

This commit is contained in:
YasinOnm08 2024-09-26 09:28:18 +02:00
parent eded5f81d9
commit e23da7a579
4 changed files with 24 additions and 2 deletions

View file

@ -1,4 +1,5 @@
import React, { useState, ForwardedRef, useEffect } from 'react';
import "../styles/variables.css"
interface InputProps {
message: string;
@ -30,6 +31,10 @@ const InputFrontend = React.forwardRef<HTMLDivElement, InputProps>(
}
};
const styles = {
}
return (
<div className="input" id="inputForm" ref={ref}>
<input
@ -43,7 +48,7 @@ const InputFrontend = React.forwardRef<HTMLDivElement, InputProps>(
<button type="button" onClick={() => onSendClick(inputValue, false)} disabled={inputDisabled ? true : false}>
<img src="/img/send.svg" alt="send" />
</button>
<button type="button" onClick={onMicClick} style={{backgroundColor: isRecording? "red" : "green"}}>
<button className={`microphone-button ${isRecording ? "red":"green"}`} type="button" onClick={onMicClick}>
<img src="/img/microphone.svg" alt="microphone" />
</button>
</div>