@helpscout/hsds-react
Version:
React component library for Help Scout's Design System
23 lines (18 loc) • 521 B
JavaScript
exports.__esModule = true;
exports.allowGlobalHotkeys = allowGlobalHotkeys;
exports.shouldUnsetDimensions = shouldUnsetDimensions;
function allowGlobalHotkeys(target) {
if (target.dataset.blocksGlobalHotkeys) {
return false;
}
if (target.closest('[data-blocks-global-hotkeys="true"]')) {
return false;
}
return true;
}
function shouldUnsetDimensions(unsetDimensions, layoutName) {
if (layoutName === 'Confirmation') return true;
if (unsetDimensions) return true;
return false;
}
;