import { Icon , mergeStyles } from '@fluentui/react' ; import React from 'react' ; import { useTheme } from '../theming' ; private export interface HighContrastAwareIconProps { /** Icon name */ iconName : string ; /** Whether button is disabled */ disabled ? : boolean | undefined ; } private export const HighContrastAwareIcon = ( props ) : JSX . Element => { const { iconName , disabled } = props ; const theme = useTheme ( ) ; return ( < Icon iconName = { iconName } className = { mergeStyles ( { svg : { fill : disabled ? theme . palette . neutralTertiary : theme . palette . neutralPrimaryAlt , '@media (forced-colors: active) and (prefers-color-scheme: dark)' : { fill : disabled ? theme . palette . neutralPrimaryAlt : theme . palette . neutralTertiary } } } ) } />); } ;