Skip to content

Commit

Permalink
Change settings icon to close icon when the settings pane is open
Browse files Browse the repository at this point in the history
  • Loading branch information
Arlodotexe committed Feb 2, 2020
1 parent 17dd844 commit 15d07e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion user-interface/dist/bundle.js

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion user-interface/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,25 @@ export class App extends React.Component<IAppProps, {}> {
super(props);
this.ToggleSettings = this.ToggleSettings.bind(this);
}

private boldStyle = {
root: {
fontWeight: FontWeights.semibold,
backgroundColor: this.props.backgroundColor
}
};

private SettingsIcon = "Settings";

private ToggleSettings(event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) {
switch (CurrentView) {
case 0:
CurrentView = Views.MainView;
this.SettingsIcon = "Settings";
break;
case 1:
CurrentView = Views.SettingsView;
this.SettingsIcon = "Cancel";
break;
default:
console.error("Invalid view: " + CurrentView, "Valid views are: " + JSON.stringify(Views));
Expand All @@ -62,7 +68,7 @@ export class App extends React.Component<IAppProps, {}> {
}}>
<div>
<ActionButton iconProps={{
iconName: "Settings",
iconName: this.SettingsIcon,
styles: SettingsStyle
}}
/>
Expand Down

0 comments on commit 15d07e3

Please sign in to comment.