ReactComponent jako deleteicon

import { ReactComponent as DeleteIcon } from '../assets/deleteIcon.svg
// 'ReactComponent' is a Create React App ([email protected]+) feature
function App() {
  const onDelete = () => /* your code */
  return (
    /* Some element to delete */
    <div>
    	<DeleteIcon onClick={() => onDelete()} />
    </div>
   )
}
Coffee Addict