Outlook_Addin_LLM/node_modules/@fluentui/react-icons/lib-cjs/utils/createFluentIcon.js

31 lines
973 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createFluentIcon = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const useIconState_1 = require("./useIconState");
const createFluentIcon = (displayName, width, paths, options) => {
const viewBoxWidth = width === "1em" ? "20" : width;
const Icon = React.forwardRef((props, ref) => {
const state = {
...useIconState_1.useIconState(props, {
flipInRtl: options === null || options === void 0 ? void 0 : options.flipInRtl
}),
ref,
width,
height: width,
viewBox: `0 0 ${viewBoxWidth} ${viewBoxWidth}`,
xmlns: "http://www.w3.org/2000/svg"
};
return React.createElement("svg", state, ...paths.map(d => React.createElement("path", {
d,
fill: state.fill
})));
});
Icon.displayName = displayName;
return Icon;
};
exports.createFluentIcon = createFluentIcon;