Skip to content

Commit

Permalink
💫 Update: Examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed Apr 16, 2023
1 parent 69459ff commit c80f14c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
19 changes: 11 additions & 8 deletions example/src/examples/Test03.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@ import {
CardToggleButton,
} from '../components/Card';

import { ModalView, ModalViewEmitterEvents } from 'react-native-ios-modal';
import {
ModalView,
ModalViewEmitterEventsDeprecated,
} from 'react-native-ios-modal';

import {
CardLogDisplay,
CardLogDisplayHandle,
} from '../components/Card/CardLogDisplay';

// eslint-disable-next-line @typescript-eslint/no-unused-vars
function getEventMessageForEventKey(event: ModalViewEmitterEvents) {
function getEventMessageForEventKey(event: ModalViewEmitterEventsDeprecated) {
switch (event) {
case 'onModalBlur':
return 'The modal is in focus';
Expand All @@ -32,9 +35,9 @@ function getEventMessageForEventKey(event: ModalViewEmitterEvents) {
return 'The modal is visible';
case 'onModalDismiss':
return 'The modal is dismissed';
case 'onModalDidDismiss':
case '_onModalDidDismiss':
return 'The modal is dismissed via swipe';
case 'onModalWillDismiss':
case '_onModalWillDismiss':
return 'The modal is being swiped down';
case 'onModalAttemptDismiss':
return 'User attempted to swipe down while isModalInPresentation';
Expand Down Expand Up @@ -97,11 +100,11 @@ export function Test03(props: ExampleProps) {
onModalDismiss={() => {
logEvent('onModalDismiss');
}}
onModalDidDismiss={() => {
logEvent('onModalDidDismiss');
_onModalDidDismiss={() => {
logEvent('_onModalDidDismiss');
}}
onModalWillDismiss={() => {
logEvent('onModalWillDismiss');
_onModalWillDismiss={() => {
logEvent('_onModalWillDismiss');
}}
onModalAttemptDismiss={() => {
logEvent('onModalAttemptDismiss');
Expand Down
3 changes: 1 addition & 2 deletions example/src/examples/Test06/ModalFocusIndicatorPill.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import * as React from 'react';
import { StyleSheet, View, Text, ViewStyle } from 'react-native';

Expand Down Expand Up @@ -44,4 +43,4 @@ const styles = StyleSheet.create({
fontWeight: '900',
color: 'white',
},
})
});

0 comments on commit c80f14c

Please sign in to comment.