Private
Public Access
1
0

feat: Fluent UI Outlook Lite + connections mockup

This commit is contained in:
2026-04-14 18:52:25 +00:00
parent 1199eff6c3
commit dfa4010406
34820 changed files with 1003813 additions and 205 deletions

View File

@@ -0,0 +1,28 @@
import * as React from 'react';
import { cx, iconClassName } from './shared';
import { useIconState } from './useIconState';
/**
* Base createFluentIcon for sprite-based icons.
*
* @access private
* @alpha
*/
export const createFluentIcon = (iconId, size, spritePath, options) => {
const viewBoxWidth = size === '1em' ? '20' : size;
const Icon = React.forwardRef((props, ref) => {
const iconState = useIconState(props, { flipInRtl: options === null || options === void 0 ? void 0 : options.flipInRtl });
const state = {
...iconState,
className: cx(iconClassName, iconState.className),
ref,
width: size,
height: size,
viewBox: `0 0 ${viewBoxWidth} ${viewBoxWidth}`,
xmlns: 'http://www.w3.org/2000/svg',
};
const href = spritePath ? `${spritePath}#${iconId}` : `#${iconId}`;
return React.createElement('svg', state, React.createElement('use', { href }));
});
Icon.displayName = iconId;
return Icon;
};