Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
44 lines
1.4 KiB
TypeScript
44 lines
1.4 KiB
TypeScript
// Module ID: 6640
|
|
// Function ID: 6641
|
|
// Name: useBottomSheetKeyboardHandling
|
|
// Dependencies: [19, 6641, 2]
|
|
// Exports: default
|
|
|
|
// Module 6640 (useBottomSheetKeyboardHandling)
|
|
import BottomSheetModal from "BottomSheetModal" /* 6641 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
require = fn;
|
|
const size = fn(2);
|
|
let result = size.fileFinishedImporting("design/components/Sheet/native/useBottomSheetKeyboardHandling.tsx");
|
|
|
|
export default function useBottomSheetKeyboardHandling(onFocus) {
|
|
onFocus = onFocus.onFocus;
|
|
const onBlur = onFocus.onBlur;
|
|
const bottomSheetInternal = BottomSheetModal.useBottomSheetInternal(true);
|
|
const items = [bottomSheetInternal, onBlur, onFocus];
|
|
return noop.useMemo(() => {
|
|
if (null == bottomSheetInternal) {
|
|
const obj2 = { onFocus, onBlur };
|
|
let obj = obj2;
|
|
} else {
|
|
obj = {
|
|
onFocus(arg0) {
|
|
const shouldHandleKeyboardEvents = bottomSheetInternal.shouldHandleKeyboardEvents;
|
|
const result = shouldHandleKeyboardEvents.set(true);
|
|
if (onFocus != null) {
|
|
tmp2(arg0);
|
|
}
|
|
},
|
|
onBlur(arg0) {
|
|
const shouldHandleKeyboardEvents = bottomSheetInternal.shouldHandleKeyboardEvents;
|
|
const result = shouldHandleKeyboardEvents.set(false);
|
|
if (onBlur != null) {
|
|
tmp2(arg0);
|
|
}
|
|
}
|
|
};
|
|
}
|
|
return obj;
|
|
}, items);
|
|
};
|