score:1

...

const useStyles = makeStyles((theme) => ({
  input: {
    "&:-webkit-autofill": {
      WebkitBoxShadow: "0 0 0 0 100px " + theme.palette.primary.main + " inset",
      backgroundColor: "#fafafa !important;",
      backgroundClip: "content-box !important",
    },
  },
}));

...

const yourComponent = () => {
  const classes = useStyles();
  
  ...

  return (
     <TextField 
         id="username"
         name="username"
         size="small"
         variant="outlined"
         className={classes.inputFields}
         value={ username || "" }
         onChange={event => setUsername(event.target.value)}
         inputProps={{ className: classes.input }}
         fullWidth
     />
     ...
  );

}

Related Query

More Query from same tag