简体   繁体   English

如何在 material-ui 中导入 more-vert 图标进行反应?

[英]How to import more-vert icon in material-ui for react?

I tried a lot but i am not able to find a way to do it.我尝试了很多,但我无法找到一种方法来做到这一点。 Where is its exact location in material-ui?它在 material-ui 中的确切位置在哪里? I saw some people using it.我看到有人用它。 Any help is appreciated.任何帮助表示赞赏。

My best guess was:我最好的猜测是:

import MoreVertIcon from '@material-ui/icons/more-vert';

Make sure you install the icon library with npm install -S @material-ui/icons and then import it like this:确保使用npm install -S @material-ui/icons安装图标库,然后像这样导入:

import MoreVertIcon from '@material-ui/icons/MoreVert';

If you wonder what the name of a particular icon is, you can see them listed here .如果您想知道特定图标的名称是什么,您可以在此处查看它们的列表。

Before use material ui icon You may need to import for that.在使用材料 ui 图标之前,您可能需要为此导入。 Steps:-脚步:-

  1. Open CMD打开命令
  2. Copy this command:- " npm install -S @material-ui/icons "复制此命令:- " npm install -S @material-ui/icons "
  3. Import icon that you want " import MoreVertIcon from '@material-ui/icons/more-vert'; "导入你想要的图标 " import MoreVertIcon from '@material-ui/icons/more-vert'; "

Thanks谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM