Skip to content

Commit

Permalink
💫 Update: Ex - ModalSheetView Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed Sep 30, 2024
1 parent 248e740 commit faf8da2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
22 changes: 22 additions & 0 deletions example/src/examples/ModalSheetViewTest01.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,28 @@ export function ModalSheetViewTest01(props: ExampleItemProps) {
"\n"
);
}}
onModalWillDismiss={({nativeEvent}) => {
if(!shouldEnableModalEventsLogging) {
return;
};

console.log(
"ModalSheetViewTest01.onModalWillDismiss",
"\n - nativeEvent:", nativeEvent,
"\n"
);
}}
onModalDidDismiss={({nativeEvent}) => {
if(!shouldEnableModalEventsLogging) {
return;
};

console.log(
"ModalSheetViewTest01.onModalDidDismiss",
"\n - nativeEvent:", nativeEvent,
"\n"
);
}}
onModalWillHide={({nativeEvent}) => {
if(!shouldEnableModalEventsLogging) {
return;
Expand Down
8 changes: 8 additions & 0 deletions example/src/examples/ModalSheetViewTest02.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ function ModalContent(props: {
logListDisplayRef.current?.addItem('onModalDidPresent');
});

useModalSheetViewEvents('onModalWillDismiss', () => {
logListDisplayRef.current?.addItem('onModalWillDismiss');
});

useModalSheetViewEvents('onModalDidDismiss', () => {
logListDisplayRef.current?.addItem('onModalDidDismiss');
});

useModalSheetViewEvents('onModalWillShow', () => {
logListDisplayRef.current?.addItem('onModalWillShow');
});
Expand Down

0 comments on commit faf8da2

Please sign in to comment.