flipper-plugin
Version:
Flipper Desktop plugin SDK and components
38 lines • 1.05 kB
JavaScript
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalizeMenuEntry = exports.buildInMenuEntries = void 0;
exports.buildInMenuEntries = {
clear: {
label: 'Clear',
accelerator: 'CmdOrCtrl+K',
action: 'clear',
},
goToBottom: {
label: 'Go To Bottom',
accelerator: 'CmdOrCtrl+B',
action: 'goToBottom',
},
createPaste: {
label: 'Create Paste',
action: 'createPaste',
},
};
function normalizeMenuEntry(entry) {
const builtInEntry = exports.buildInMenuEntries[entry.action];
return builtInEntry
? { ...builtInEntry, ...entry }
: {
...entry,
action: entry.action || entry.label,
};
}
exports.normalizeMenuEntry = normalizeMenuEntry;
//# sourceMappingURL=MenuEntry.js.map
;