caponetto commented on code in PR #2164:
URL:
https://github.com/apache/incubator-kie-tools/pull/2164#discussion_r1535435980
##########
packages/editor/src/envelope/KeyBindingsHelpOverlay/KeyBindingsHelpOverlay.tsx:
##########
@@ -82,11 +84,13 @@ export function KeyBindingsHelpOverlay() {
}
}, [showing]);
+ const themeCss = envelopeContext.supportedThemes.length > 1 && !theme! &&
theme === EditorTheme.DARK ? " dark" : "";
Review Comment:
Since you've introduced the `supportedThemes` array, I think this line needs
some attention. Maybe extract it into a more generic function? I mean, if we
add more themes, we'd need to change this line too (currently, the value is
either empty string or `dark`). And what happens if I provide only one
supported theme, and it's the dark one? Also, I think the part `&& !theme!` is
unnecessary.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]