微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何将组件添加到ICommandBarItemProps项

如何解决如何将组件添加到ICommandBarItemProps项

当前,我正在使用水平堆栈将“按钮组件”“添加”到命令栏。理想的解决方案应该是将CalendarButtonExample组件添加到CommandBar项目(ICommandBarItemProps)中,以便采用CommandBar等的样式。是否有办法将组件添加到ICommandBarItemProps []数组项目中?

当前

 <Stack horizontal>

      <CalendarButtonExample />
      
      <CommandBar
        items={_items}
        overflowItems={_overflowItems}
        overflowButtonProps={overflowProps}
        farItems={_farItems}
        ariaLabel="Use left and right arrow keys to navigate between commands"
      />

 </Stack>

enter image description here

这是_items的样子

const _items: ICommandBarItemProps[] = [
  {
    key:"dateSelector",text:"SelectDate",iconProps:{iconName:"Calendar"}
  },{
    key: "today",text: "Today",iconProps: { iconName: "Upload" },href: "https://developer.microsoft.com/en-us/fluentui"
  },... ]

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。