2024-06-25 14:41:11 +05:30
|
|
|
import { TextField, Box } from "@mui/material";
|
2024-07-06 13:08:43 +05:30
|
|
|
import React from 'react';
|
2024-06-25 14:41:11 +05:30
|
|
|
|
2024-07-06 13:08:43 +05:30
|
|
|
const TextInputField = React.forwardRef(({ placeholder, value, setValue, onKeyDown }, ref) => {
|
2024-06-25 14:41:11 +05:30
|
|
|
return (
|
|
|
|
|
<Box className="d-flex flex-column">
|
2024-07-06 13:08:43 +05:30
|
|
|
<label htmlFor="limit-input" className="text-left">
|
2024-06-25 14:41:11 +05:30
|
|
|
{placeholder} :-
|
|
|
|
|
</label>
|
|
|
|
|
<TextField
|
|
|
|
|
className="rounded h6 bg-white"
|
|
|
|
|
type="text"
|
|
|
|
|
placeholder={placeholder}
|
|
|
|
|
id="limit-input"
|
|
|
|
|
autoComplete="off"
|
|
|
|
|
value={value}
|
|
|
|
|
onChange={(e) => setValue(e.target.value)}
|
2024-07-06 13:08:43 +05:30
|
|
|
onKeyDown={onKeyDown}
|
|
|
|
|
inputRef={ref}
|
2024-06-25 14:41:11 +05:30
|
|
|
/>
|
|
|
|
|
</Box>
|
|
|
|
|
);
|
2024-07-06 13:08:43 +05:30
|
|
|
});
|
2024-06-25 14:41:11 +05:30
|
|
|
|
|
|
|
|
export default TextInputField;
|