actions={[
{
icon: 'edit',
tooltip: 'Edit User',
onClick: (event, rowData) => alert('You are editing ' + rowData.name)
},
{
icon: 'delete',
tooltip: 'Delete User',
onClick: (event, rowData) => confirm('You want to delete ' + rowData.name)
}
]}
You can change the icon of the action by supplying arbitrary React component as the value for icon
prop.
icon string or () => ReactElement - Icon of button from material icons or custom component
So instead of edit
or delete
, add a component of a desired icon. Something like:
import { Edit } from '@material-ui/icons'
// ...
{
icon: () => <Edit />,
tooltip: 'Edit User',
onClick: (event, rowData) => alert('You are editing ' + rowData.name)
},
// ...
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