-
I have multiple command bar items that need custom SVG Icons, but no matter what I do, I cannot get the icons to work for the life of me. Here is the SVG I am registering as an icon: Here is the command bar items, the first item is where the icon should go to: `const _items: ICommandBarItemProps[] = [
Interestingly, the icon works perfectly when loaded as a FontIcon, but doesn't work as an icon of a command bar item:
);` Please help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I found a way to do this, the onRenderIcon function works, but it only works if iconProps is provided with a fluent
|
Beta Was this translation helpful? Give feedback.
I found a way to do this, the onRenderIcon function works, but it only works if iconProps is provided with a fluent
UI-registered
icon name.const _items: ICommandBarItemProps[] = [ { key: 'assigned', text: 'Assigned', //cacheKey: 'myCacheKey', iconProps: { iconName: 'Assign' }, onRenderIcon: () => (<img style={{ height: "20px", width: "20px" }} src={AssignmentIcons.Assigned} />), className: filterType == 'assigned' ? 'selectedView' : '', onClick: () => handleFilterChange('assigned') },