decord/source/design/components/Sheet/native/BottomSheetHandle.tsx

54 lines
1.3 KiB
TypeScript
Raw Normal View History

// Module ID: 7205
// Function ID: 7206
// Name: Sheet/BottomSheetHandle
2026-07-29 08:29:29 +00:00
// Dependencies: [19, 2]
2026-07-20 16:05:17 +00:00
// Exports: useBottomSheetImperativeHandle
// Module 7205 (Sheet/BottomSheetHandle)
import noop from "module_19" /* 19 */;
2026-07-23 10:11:24 +00:00
const size = fn(2);
const result = size.fileFinishedImporting("design/components/Sheet/native/BottomSheetHandle.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const useBottomSheetImperativeHandle = function useBottomSheetImperativeHandle(ref, ref) {
closure_0 = ref;
2026-07-20 16:05:17 +00:00
const items = [ref];
const imperativeHandle = noop.useImperativeHandle(ref, () => ({
2026-07-20 16:05:17 +00:00
expandActionSheet() {
const current = ref.current;
2026-07-29 08:29:29 +00:00
if (current != null) {
2026-07-20 16:05:17 +00:00
current.expand();
}
},
closeActionSheet(force) {
force = undefined;
2026-07-29 08:29:29 +00:00
if (force != null) {
2026-07-20 16:05:17 +00:00
force = force.force;
}
if (true === force) {
const current2 = ref.current;
2026-07-29 08:29:29 +00:00
if (current2 != null) {
2026-07-20 16:05:17 +00:00
current2.forceClose();
}
} else {
const current = ref.current;
2026-07-29 08:29:29 +00:00
if (current != null) {
2026-07-20 16:05:17 +00:00
current.close();
}
}
},
collapseActionSheet() {
const current = ref.current;
2026-07-29 08:29:29 +00:00
if (current != null) {
2026-07-20 16:05:17 +00:00
current.collapse();
}
},
snapToIndex(collapse) {
const current = ref.current;
2026-07-29 08:29:29 +00:00
if (current != null) {
current.snapToIndex(collapse);
2026-07-20 16:05:17 +00:00
}
}
}), items);
};