I'm a newb to React and front-end development and I recently started playing with Material UI. Is there a way to hook an icon to an action?
I'm looking for something like this:
<DeleteIcon onClick={this.handleClick} />
Thanks for your help!
Wrap the DeleteIcon in an IconButton:
<IconButton onClick={this.handleClick}>
<DeleteIcon/>
</IconButton>
Look here for more details: https://material-ui.com/api/icon-button/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With