2024-09-19 19:22:43 -05:00
|
|
|
"use client"
|
|
|
|
|
import { TextField } from "@mui/material"
|
|
|
|
|
import React from "react"
|
|
|
|
|
|
|
|
|
|
interface InputProps {
|
|
|
|
|
type: string
|
|
|
|
|
placeholder?: string
|
|
|
|
|
value: string
|
|
|
|
|
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void
|
|
|
|
|
autocomplete?: string
|
2024-09-24 17:35:35 -05:00
|
|
|
disabled?: boolean
|
2024-09-19 19:22:43 -05:00
|
|
|
}
|
|
|
|
|
|
2024-09-24 17:35:35 -05:00
|
|
|
const Input: React.FC<InputProps> = ({ type, placeholder, value, onChange, autocomplete, disabled }) => {
|
2024-09-19 19:22:43 -05:00
|
|
|
return (
|
|
|
|
|
<TextField
|
|
|
|
|
type={type}
|
|
|
|
|
placeholder={placeholder}
|
|
|
|
|
value={value}
|
|
|
|
|
onChange={onChange}
|
|
|
|
|
autoComplete={autocomplete}
|
|
|
|
|
fullWidth
|
|
|
|
|
variant="outlined"
|
2024-09-24 17:35:35 -05:00
|
|
|
disabled={disabled}
|
2024-09-19 19:22:43 -05:00
|
|
|
/>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default Input
|