forked from Greyisheep/apiconf-agent
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathInputArea.tsx
More file actions
26 lines (23 loc) · 759 Bytes
/
InputArea.tsx
File metadata and controls
26 lines (23 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import React from 'react'
import type { InputAreaProps } from '../../../types/DataTypes'
import styles from '../Chat.module.css';
import { FiSend } from 'react-icons/fi';
const InputArea: React.FC <InputAreaProps> = ({input,setInput,handleSubmit}) => {
return (
<div className={styles.inputArea}>
<form onSubmit={handleSubmit} className={styles.inputForm}>
<input
type="text"
className={styles.inputField}
value={input}
onChange={(e) => setInput(e.target.value)}
placeholder="Ask something..."
/>
<button type="submit" className={styles.sendButton}>
<FiSend />
</button>
</form>
</div>
)
}
export default InputArea