material ui icon button

JavaScript
// if this helped, don't forget to upvote so others can see

import React from 'react';
import LocationOnIcon from '@material-ui/icons/LocationOn';
import IconButton from '@material-ui/core/IconButton';

export default function ButtonWithIcon () {

  return(
    <IconButton>
      <LocationOnIcon />
    </IconButton>
  )
}// imports
import IconButton from "@material-ui/core/IconButton";
import InputAdornment from "@material-ui/core/InputAdornment";
import SearchIcon from "@material-ui/icons/Search";

// render

<TextField
  label="With normal TextField"
  InputProps={{
    endAdornment: (
      <InputAdornment>
        <IconButton>
          <SearchIcon />
        </IconButton>
      </InputAdornment>
    )
  }}
/>
//surround the whatever Icon you have inside a <IconButton><IconButton/> tag 
this IconButton is being provided by @material-ui/core,so dont forget to import thatnpm install @material-ui/core
npm install @material-ui/icons

import RoomIcon from '@material-ui/icons/Room';

<RoomIcon />
Source

Also in JavaScript: