Skip to content

Commit

Permalink
💫 Example - Fix TS Build Errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed Mar 9, 2022
1 parent f82facf commit 48be88c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
3 changes: 1 addition & 2 deletions example/src/components/ExampleItemPopoverView.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as React from 'react';
import { useCallback, useRef } from 'react';
import { StyleSheet, View, Text, TouchableOpacity, ViewProps } from 'react-native';
import { StyleSheet, View, Text, ViewProps } from 'react-native';

import * as Colors from '../constants/Colors';

Expand Down
3 changes: 3 additions & 0 deletions example/src/components/PopoverViewExample04.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ export default function PopoverViewExample04(props: ViewProps) {
};

const styles = StyleSheet.create({
popoverContentContainer: {
padding: 20
},
popoverText: {
fontSize: 16,
fontWeight: 'bold',
Expand Down
6 changes: 3 additions & 3 deletions example/src/components/PopoverViewExample06.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { useRef } from 'react';
import { StyleSheet, View, Text, ViewProps } from 'react-native';
import { StyleSheet, View, Text, ViewProps, Alert } from 'react-native';

import { PopoverView } from 'react-native-ios-popover';
import { Button } from './Button';
Expand All @@ -19,8 +19,8 @@ export default function PopoverViewExample06(props: ViewProps) {
>
<PopoverView
ref={popoverRef}
onPopoverDidHide={() => alert('onPopoverDidHide')}
onPopoverDidShow={() => alert('onPopoverDidShow')}
onPopoverDidHide={() => Alert.alert('event', 'onPopoverDidHide')}
onPopoverDidShow={() => Alert.alert('event', 'onPopoverDidShow')}
renderPopoverContent={() => (
<View style={styles.popoverContentContainer}>
<Text style={styles.popoverText}>
Expand Down
6 changes: 4 additions & 2 deletions example/src/components/PopoverViewExample07.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { useState, useRef } from 'react';
import { StyleSheet, View, Text, Switch, ViewProps } from 'react-native';
import { StyleSheet, View, Text, Switch, ViewProps, Alert } from 'react-native';

import { PopoverView } from 'react-native-ios-popover';
import { Button } from './Button';
Expand All @@ -22,7 +22,9 @@ export default function PopoverViewExample07(props: ViewProps) {
<PopoverView
ref={popoverRef}
popoverShouldDismiss={isEnabled}
onPopoverDidAttemptToDismiss={() => alert('onPopoverDidAttemptToDismiss')}
onPopoverDidAttemptToDismiss={() =>
Alert.alert('event', 'onPopoverDidAttemptToDismiss')
}
renderPopoverContent={() => (
<View style={styles.popoverContainer}>
<Text style={styles.popoverText}>
Expand Down

0 comments on commit 48be88c

Please sign in to comment.