title: React how to use icon inside Textfield Material-UI with TypeScript
body: <p>I have designed a form with validation using TypeScript Material UI and Formik. I want a material UI Icon to appear in my textfield area, here's my code:</p>
  
  <pre><code>
  import React from 'react'
  import { Formik, Form, FieldAttributes,useField} from 'formik'
  import { TextField } from '@material-ui/core'
  import CalendarTodayIcon from '@material-ui/icons/CalendarToday'
  import * as yup from 'yup'
  import './MainInfo.css'
  
  const MyTextField: React.FC&lt;FieldAttributes&lt;{}&gt;&gt; = ({
    placeholder,type,className,style,
    ...props
  }) =&gt; {
    const [field, meta] = useField&lt;{}&gt;(props);
    const errorText = meta.error &amp;&amp; meta.touched ? meta.error : "";
    return (
      &lt;div className='container'&gt;
      &lt;TextField
      placeholder={placeholder}
      className={className}
      style={style}
      type={type}
      {...field}
      helperText={errorText}
      error={!!errorText}
      id="outlined-basic" 
      variant="outlined"
    /&gt;
      &lt;/div&gt;
    );
  };
  
  export function MainInfo() {
  
      return (
        &lt;div&gt;
          &lt;Formik
            validateOnChange={true} validationSchema={validationSchema} initialValues={{ Title: '', ActivationDate: '', ExpirationDate: '', DirectManager: '', HRBP: '' }} onSubmit={(data) =&gt; {
              console.log(data)
            }}
          &gt;
            {({values, errors}) =&gt; (
              &lt;Form id='my-form' &gt;
                &lt;div&gt;
                  &lt;label className='label'&gt;عنوان&lt;/label&gt;
                  &lt;div &gt;            
                    &lt;MyTextField style={{width:'60%'}}  placeholder='طراح' name='Title' type='input' /&gt;
                  &lt;/div&gt;
                    ...
                &lt;/div&gt;
              &lt;/Form&gt;
            )}
          &lt;/Formik&gt;
        &lt;/div&gt;
      )
  }
  </code></pre>
  
  <p>but the problem is that I can not add a new Icon property or InputProp since <code>&lt;FieldAttributes&lt;{}&gt;&gt;</code> doesnt accept it. how can I define a new property for the FieldAttributes or fix this issue?</p>