如何更改ContextualMenu的默认图标

时间:2020-03-04 08:18:30

标签: reactjs office-ui-fabric react-tsx office-ui-fabric-react

请参阅https://developer.microsoft.com/en-us/fabric#/controls/web/contextualmenu中ContextualMenu的示例,我想将默认图标(ChevronDown)更改为ChevronUp。我怎么做? 我通过提供带有所需图标的styles变量尝试了一些选择,但还没有成功。 有关如何执行此操作的任何想法?

1 个答案:

答案 0 :(得分:0)

您可以使用Office ui界面“ Button”组件的menuIconProps属性来更改图标。

<Button menuIconProps={{ iconName:"MoreVertical" }} menuProps={{ items:[]}}>
   Click Me
</Button>