How to make the whole Card component clickable in Material UI using React JS?

后端 未结 7 1080
抹茶落季
抹茶落季 2021-01-31 03:44

Im using Material UI Next in a React project. I have the Card component which has an image(Card Media) and text(Card Text) inside it. I also have a button underneath the text. M

7条回答
  •  梦如初夏
    2021-01-31 04:00

    Just wrap the whole thing in the Material CardActionArea component. Everything inside of it will be clickable.

    
       
       .......Image Stuff
       
       
       .......Content
       
    
    

提交回复
热议问题