office-ui-fabric - 我可以在非 Microsoft 内部应用程序中使用 Office UI Fabric React 吗?

标签 office-ui-fabric

我想知道是否可以在与 SharePoint 或 Office 等 Microsoft 服务无关的公司内部应用程序中使用 Office React Fabric UI 框架。

我阅读了许可证,但没有完全弄清楚我的问题。

https://github.com/OfficeDev/office-ui-fabric-react/blob/master/LICENSE

最佳答案

是的!您绝对可以将 Fabric 用于此类应用程序。然而,根据assets license从该许可证文档链接到的资源(字体和图标)只有在应用程序以某种方式连接到 Microsoft 服务时才能使用。这可能就像将应用程序托管为 Azure Web 应用程序一样简单。

这是来自此 GitHub comment 的相关引用对此进行了一些扩展:

Fabric's assets (fonts, icons, and product logos) are part of Microsoft's brand, and can only be used in apps & services--including commercial ones--that connect with Microsoft products. These include Add-ins for Office, web parts for SharePoint, and other extensions for Microsoft products. This applies to usage of the assets in application code itself as well as any designs produced by the toolkit.

However, all of Fabric's code (JS, CSS, etc.) is MIT-licensed and can be used in non-Microsoft commercial products. There's even first-class support for Selawik, an open source drop-in substitute for Segoe UI. There is not a substitute for the icon font today, however.

要选择退出这些资源,您可以将 Fabric 的默认图标替换为 Font Awesome 之类的图标,如下所示:

import { registerIcons } from '@uifabric/styling';
import FontAwesomeIcon from '@fortawesome/react-fontawesome';

registerIcons({
  icons: {
    'check-square': <FontAwesomeIcon icon='check-square' />,
    ...etc
  }
});

要选择退出 Segoe UI,您可以创建一个自定义主题,用不同的字体替换 defaultFontStyle。这是一个 CodePen 说明:https://codepen.io/jahnp/pen/pYMyZM

关于office-ui-fabric - 我可以在非 Microsoft 内部应用程序中使用 Office UI Fabric React 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55389251/

相关文章:

reactjs - React Context API 很慢

javascript - 使命令栏无响应

javascript - 无法从对话框中的 &lt;script&gt; 访问 Javascript API for Office

office-ui-fabric - 如何实现 Fluent UI DetailsList 拖放行视觉指示器

reactjs - 更改 Office UI Fabric React 组件的颜色/主题?

css - 如何减小 Office ui 结构中复选框和单选按钮的大小

reactjs - 包括不是来自 CDN 的 office-ui-fabric 样式

office-ui-fabric - 设置 Office UI Fabric TextField 的最大宽度

javascript - 从结构对话框覆盖层中删除单击处理程序

reactjs - 如何解决 "element.getBoundingClientRect is not a function"