Home > Blockchain >  How to add menu item to Material UI Card
How to add menu item to Material UI Card

Time:01-30

I have the following example:

https://codesandbox.io/s/material-ui-card-styling-example-lcup6?fontsize=14

I just wanted to add some menu e.g. Edit, Delete to the 3 dots menu link, but could not succeeded. Tried to add menu items, etc to the IconButton and MoreVertIcon sections but nothing is changed.

So, how can I do this?

CodePudding user response:

The example that you have linked does not have any onClick action tied to the menu link. It sounds like you will need a Menu element appear when the menu button is clicked. Take a look at the Menu component in the MUI docs.

As an example, I forked your example and added a menu.

  • Related