@empoleon/spotlight
Version:
Command center components for react and Empoleon
16 lines (13 loc) • 366 B
JavaScript
import { spotlightActions } from './spotlight.store.mjs';
function getHotkeys(hotkeys, store) {
if (!hotkeys) {
return [];
}
const open = () => spotlightActions.open(store);
if (Array.isArray(hotkeys)) {
return hotkeys.map(hotkey => [hotkey, open]);
}
return [[hotkeys, open]];
}
export { getHotkeys };
//# sourceMappingURL=get-hotkeys.mjs.map