Rev 2081 | AutorÃa | Ultima modificación | Ver Log |
import React from 'react'import { InputAdornment, TextField } from '@mui/material'const Input = ({label = '',inputRef = null,icon: Icon = null,error = null,name = '',onChange = () => {},value = '',type = 'text',placeholder = '',accept = ''}) => {return (<TextFieldlabel={label}helperText={error}error={Boolean(error)}ref={inputRef}id={name}name={name}fullWidthplaceholder={placeholder}onChange={onChange}value={value}InputProps={{startAdornment: Icon ? (<InputAdornment position='start'><Icon /></InputAdornment>) : null}}inputProps={{accept}}type={type}/>)}export default Input