Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/>
);
}
}
class HighContrastExample extends React.Component {
state = {
isHighContrast: AppTheme.isHighContrast,
highContrastColorValues: AppTheme.currentHighContrastColors,
currentTheme: AppTheme.currentTheme,
};
componentDidMount() {
AppTheme.addListener('highContrastChanged', this.onHighContrastChanged);
AppTheme.addListener('appThemeChanged', this.onAppThemeChanged);
}
componenetWillUnmount() {
AppTheme.removeListener('highContrastChanged', this.onHighContrastChanged);
AppTheme.removeListener('appThemeChanged', this.onAppThemeChanged);
}
// TODO: Make args props
onHighContrastChanged = (event: IHighContrastChangedEvent) => {
this.setState({