From 9fff562b4f1141011ba9d1b83af43fcee79df50d Mon Sep 17 00:00:00 2001 From: Jamie Halvorson Date: Sat, 11 Apr 2020 17:15:31 +0100 Subject: [PATCH] feat: add example with maps --- example/ios/Podfile.lock | 10 +++- example/package.json | 1 + example/src/App.tsx | 6 ++ example/src/screens/customHeaderMap.tsx | 25 ++++++++ example/src/screens/imageWithOverlay.tsx | 5 -- example/yarn.lock | 5 ++ src/parallax-header/index.models.ts | 6 +- src/parallax-header/index.tsx | 74 ++++++++++++++++++++---- 8 files changed, 111 insertions(+), 21 deletions(-) create mode 100644 example/src/screens/customHeaderMap.tsx diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index f7e9b60..9678769 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,7 +1,7 @@ PODS: - boost-for-react-native (1.63.0) - DoubleConversion (1.1.6) - - fabfit-react-native-parallax-header (0.1.0): + - fabfit-react-native-parallax-header (0.3.0): - React - FBLazyVector (0.61.5) - FBReactNativeSpec (0.61.5): @@ -184,6 +184,8 @@ PODS: - React-cxxreact (= 0.61.5) - React-jsi (= 0.61.5) - React-jsinspector (0.61.5) + - react-native-maps (0.27.1): + - React - react-native-safe-area-context (0.7.3): - React - React-RCTActionSheet (0.61.5): @@ -249,6 +251,7 @@ DEPENDENCIES: - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) + - react-native-maps (from `../node_modules/react-native-maps`) - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) @@ -302,6 +305,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/jsiexecutor" React-jsinspector: :path: "../node_modules/react-native/ReactCommon/jsinspector" + react-native-maps: + :path: "../node_modules/react-native-maps" react-native-safe-area-context: :path: "../node_modules/react-native-safe-area-context" React-RCTActionSheet: @@ -338,7 +343,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2 - fabfit-react-native-parallax-header: 391903e4e86231ec5d31964135e8effb12297850 + fabfit-react-native-parallax-header: f0851bc1629ee643d0b4ba55a7941c54a1bbe61f FBLazyVector: aaeaf388755e4f29cd74acbc9e3b8da6d807c37f FBReactNativeSpec: 118d0d177724c2d67f08a59136eb29ef5943ec75 Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51 @@ -352,6 +357,7 @@ SPEC CHECKSUMS: React-jsi: cb2cd74d7ccf4cffb071a46833613edc79cdf8f7 React-jsiexecutor: d5525f9ed5f782fdbacb64b9b01a43a9323d2386 React-jsinspector: fa0ecc501688c3c4c34f28834a76302233e29dc0 + react-native-maps: f4b89da81626ad7f151a8bfcb79733295d31ce5c react-native-safe-area-context: e200d4433aba6b7e60b52da5f37af11f7a0b0392 React-RCTActionSheet: 600b4d10e3aea0913b5a92256d2719c0cdd26d76 React-RCTAnimation: 791a87558389c80908ed06cc5dfc5e7920dfa360 diff --git a/example/package.json b/example/package.json index 1b4c67f..8152ce0 100644 --- a/example/package.json +++ b/example/package.json @@ -15,6 +15,7 @@ "react": "16.9.0", "react-native": "0.61.5", "react-native-gesture-handler": "^1.6.1", + "react-native-maps": "^0.27.1", "react-native-reanimated": "^1.7.1", "react-native-safe-area-context": "^0.7.3", "react-native-screens": "^2.4.0" diff --git a/example/src/App.tsx b/example/src/App.tsx index 4dcf700..303540b 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -4,6 +4,7 @@ import { NavigationContainer } from '@react-navigation/native'; import { createStackNavigator } from '@react-navigation/stack'; import ImageScreen from './screens/image'; import ImageWithOverlayScreen from './screens/imageWithOverlay'; +import CustomHeaderMap from './screens/customHeaderMap'; function HomeScreen({ navigation }: any) { return ( @@ -14,6 +15,10 @@ function HomeScreen({ navigation }: any) { title="with Image and Overlay" onPress={() => navigation.navigate('ImageWithOverlay')} /> +