feat: move contextMenu into the component tree and control via appState (#6021)

This commit is contained in:
David Luzar 2022-12-21 12:47:09 +01:00 committed by GitHub
parent b704705ed8
commit 7e135c4e22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 1752 additions and 398 deletions

View file

@ -18,6 +18,9 @@ export const actionToggleZenMode = register({
};
},
checked: (appState) => appState.zenModeEnabled,
contextItemPredicate: (elements, appState, appProps) => {
return typeof appProps.zenModeEnabled === "undefined";
},
contextItemLabel: "buttons.zenMode",
keyTest: (event) =>
!event[KEYS.CTRL_OR_CMD] && event.altKey && event.code === CODES.Z,