refactor(modal): move keyboard behavior for gestures into component (#24650)

This commit is contained in:
Sean Perkins
2022-01-25 12:25:16 -05:00
committed by GitHub
parent 525f01f086
commit 6f66d08ba8
3 changed files with 39 additions and 49 deletions

View File

@@ -231,9 +231,6 @@ export const createGesture = (config: GestureConfig): Gesture => {
destroy() {
gesture.destroy();
pointerEvents.destroy();
if (config.onDestroy !== undefined) {
config.onDestroy();
}
}
};
};
@@ -328,11 +325,6 @@ export interface GestureConfig {
onStart?: GestureCallback;
onMove?: GestureCallback;
onEnd?: GestureCallback;
/**
* Callback to extend the behavior when a gesture
* handler is destroyed.
*/
onDestroy?: () => void;
notCaptured?: GestureCallback;
}