diff options
| author | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-08-02 18:20:59 -0500 |
|---|---|---|
| committer | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-08-02 18:20:59 -0500 |
| commit | ac177d7b9a01075fbf1ad1c327c7625d95569afb (patch) | |
| tree | ea89bf577df1afa960109f2b741dee3faec450c5 /src/client/views/nodes/FontIconBox.tsx | |
| parent | f818303cb164b471805075226cba5451f35b27a2 (diff) | |
bug fixes found with sally
Diffstat (limited to 'src/client/views/nodes/FontIconBox.tsx')
| -rw-r--r-- | src/client/views/nodes/FontIconBox.tsx | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/client/views/nodes/FontIconBox.tsx b/src/client/views/nodes/FontIconBox.tsx index 720d6a15d..7c538df92 100644 --- a/src/client/views/nodes/FontIconBox.tsx +++ b/src/client/views/nodes/FontIconBox.tsx @@ -66,18 +66,21 @@ export class FontIconBox extends DocComponent<FieldViewProps, FontIconDocument>( if (this.layoutDoc.menuIcon) { - let backgroundColor = "black"; - if (this.dataDoc.title === "Sharing" || this.dataDoc.title === "Help" || this.dataDoc.title === "Settings" || this.dataDoc.title === "Import") { - backgroundColor = "black"; - } else { - backgroundColor = CurrentUserUtils.selectedPanel === this.dataDoc.title ? "lightgrey" : "black"; - } + // let backgroundColor = "black"; + // if (this.dataDoc.title === "Sharing" || this.dataDoc.title === "Help" || this.dataDoc.title === "Settings" || this.dataDoc.title === "Import") { + // backgroundColor = "black"; + // } else { + // backgroundColor = CurrentUserUtils.selectedPanel === this.dataDoc.title ? "lightgrey" : ""; + // } - const color = backgroundColor === "lightgrey" ? "black" : "white"; - const menuBTN = <div className="menuButton" style={{ backgroundColor: backgroundColor }}> + const color = CurrentUserUtils.selectedPanel === this.dataDoc.title ? "black" : "white"; + const menuBTN = <div className="menuButton" + style={{ backgroundColor: CurrentUserUtils.selectedPanel === this.dataDoc.title ? "lightgrey" : "" }}> - <div className="menuButton-wrap" style={{ backgroundColor: backgroundColor }}> - <FontAwesomeIcon className="menuButton-icon" icon={StrCast(this.dataDoc.icon, "user") as any} color={color} size="lg" /> + <div className="menuButton-wrap" + style={{ backgroundColor: CurrentUserUtils.selectedPanel === this.dataDoc.title ? "lightgrey" : "" }}> + <FontAwesomeIcon className="menuButton-icon" + icon={StrCast(this.dataDoc.icon, "user") as any} color={color} size="lg" /> <div className="menuButton-label" style={{ color: color }}> {this.dataDoc.title} </div> </div> </div>; |
