-
Here's a screenshot of what I'm having trouble with: I have a const buttonStyles: Partial<IContextualMenuItemStyles> = {
icon: { color: theme.palette.neutralPrimary },
iconHovered: { color: theme.palette.neutralPrimary },
iconPressed: { color: theme.palette.neutralPrimary },
// options below are ones that I've tried to add with no success
iconChecked: { color: theme.palette.neutralPrimary },
iconColor: { color: theme.palette.neutralPrimary },
iconExpanded: { color: theme.palette.neutralPrimary },
iconExpandedHovered: { color: theme.palette.neutralPrimary },
menuIcon: { color: theme.palette.neutralPrimary },
menuIconChecked: { color: theme.palette.neutralPrimary },
menuIconExpanded: { color: theme.palette.neutralPrimary },
menuIconExpandedHovered: { color: theme.palette.neutralPrimary },
menuIconHovered: { color: theme.palette.neutralPrimary },
menuIconPressed: { color: theme.palette.neutralPrimary },
subMenuIcon: { color: theme.palette.neutralPrimary },
};
const commandBarItems: ICommandBarItemProps[] = [
{
buttonStyles,
key: 'clearFilters',
text: 'Clear filters',
iconProps: { iconName: 'ClearFilter' },
disabled: disableClearFiltersButton,
onClick: onClearFilters,
},
{
buttonStyles,
key: 'customizeColumns',
text: 'Custom columns',
iconProps: { iconName: 'TripleColumnEdit' },
componentRef: menuRef,
subMenuProps: {
items: [{ key: 'empty', itemType: ContextualMenuItemType.Section }],
onRenderMenuList: () => {
return (
<CustomColumnsMenu
columns={columns}
hiddenColumns={hiddenColumns}
onApply={(newHiddenColumns) => {
menuRef.current?.dismissMenu();
onChangeHiddenColumns(newHiddenColumns);
}}
/>
);
},
},
},
]; |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In case someone comes across this, there appears to be an open issue with the Link to issue: #23300 For now, I think I'm just going to add const buttonStyles: Partial<IContextualMenuItemStyles> = {
icon: { color: `${theme.palette.neutralPrimary} !important` },
}; |
Beta Was this translation helpful? Give feedback.
In case someone comes across this, there appears to be an open issue with the
iconExpanded
styling not applying.Link to issue: #23300
For now, I think I'm just going to add
!important
to the color of the base icon style. Hate to do it but can't think of another option.