[英]Office-UI-Fabric-React: How to replace the icons "ChevronDown" and "ChevronRight" in a CommandBar menu?
Please have a look at the following demo: https://codesandbox.io/s/sharp-bell-u9e3s请看下面的演示: https : //codesandbox.io/s/sharp-bell-u9e3s
You see a simple CommandBar example where at "Submenu 1.2" the normal icon "ChevronRight" is replaced by the icon "Forward".您会看到一个简单的 CommandBar 示例,其中在“Submenu 1.2”中,普通图标“ChevronRight”被图标“Forward”替换。 The other icon at top level should also be replace => instead of "ChevronDown" the icon called "Down" shall be used.
顶层的另一个图标也应该替换 => 而不是“ChevronDown”,应该使用名为“Down”的图标。 How is this possible???
这怎么可能???
PS: Of course, in real world I want those icons to be replaced by totally different open-source license icons, but I wanted the demo to be as simple as possible. PS:当然,在现实世界中,我希望这些图标被完全不同的开源许可证图标替换,但我希望演示尽可能简单。 BTW: Function "registerIcons" is not an option for me.
顺便说一句:功能“registerIcons”对我来说不是一个选项。
Each commandbar item is a button.每个命令栏项目都是一个按钮。 Button's take menuIconProps.
按钮采用 menuIconProps。
key: "1.0",
name: "Menu 1",
menuIconProps: {
iconName: 'Add'
},
Check out the icon component for other ways to customize:https://developer.microsoft.com/en-us/fabric#/controls/web/icon查看图标组件以了解其他自定义方式:https ://developer.microsoft.com/en-us/fabric#/controls/web/icon
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.