diff options
-rw-r--r-- | App.tsx | 89 | ||||
-rw-r--r-- | ios/Podfile.lock | 6 | ||||
-rw-r--r-- | package.json | 5 | ||||
-rw-r--r-- | yarn.lock | 5 |
4 files changed, 27 insertions, 78 deletions
@@ -26,93 +26,30 @@ import { ReloadInstructions, } from 'react-native/Libraries/NewAppScreen'; +import LinearGradient from 'react-native-linear-gradient'; + declare const global: {HermesInternal: null | {}}; const App = () => { return ( <> - <StatusBar barStyle="dark-content" /> - <SafeAreaView> - <ScrollView - contentInsetAdjustmentBehavior="automatic" - style={styles.scrollView}> - <Header /> - {global.HermesInternal == null ? null : ( - <View style={styles.engine}> - <Text style={styles.footer}>Engine: Hermes</Text> - </View> - )} - <View style={styles.body}> - <View style={styles.sectionContainer}> - <Text style={styles.sectionTitle}>Step One</Text> - <Text style={styles.sectionDescription}> - Edit <Text style={styles.highlight}>App.tsx</Text> in order to change - this screen and then come back to see your edits. - </Text> - </View> - <View style={styles.sectionContainer}> - <Text style={styles.sectionTitle}>See Your Changes</Text> - <Text style={styles.sectionDescription}> - <ReloadInstructions /> - </Text> - </View> - <View style={styles.sectionContainer}> - <Text style={styles.sectionTitle}>Debug</Text> - <Text style={styles.sectionDescription}> - <DebugInstructions /> - </Text> - </View> - <View style={styles.sectionContainer}> - <Text style={styles.sectionTitle}>Learn More</Text> - <Text style={styles.sectionDescription}> - Read the docs to discover what to do next: - </Text> - </View> - <LearnMoreLinks /> - </View> - </ScrollView> - </SafeAreaView> + <View style={styles.container}> + <LinearGradient colors={['#8F00FF', '#6EE7E7']} style={styles.linearGradient} useAngle={true} angle={154.72} angleCenter={{x:0.5,y:0.5}}> + + </LinearGradient> + </View> </> ); }; const styles = StyleSheet.create({ - scrollView: { - backgroundColor: Colors.lighter, - }, - engine: { - position: 'absolute', - right: 0, - }, - body: { - backgroundColor: Colors.white, - }, - sectionContainer: { - marginTop: 32, - paddingHorizontal: 24, - }, - sectionTitle: { - fontSize: 24, - fontWeight: '600', - color: Colors.black, - }, - sectionDescription: { - marginTop: 8, - fontSize: 18, - fontWeight: '400', - color: Colors.dark, - }, - highlight: { - fontWeight: '700', - }, - footer: { - color: Colors.dark, - fontSize: 12, - fontWeight: '600', - padding: 4, - paddingRight: 12, - textAlign: 'right', + container: { + flex: 1, + backgroundColor: 'transparent' }, + linearGradient: { + flex: 1, + } }); export default App; diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 9db48555..ae22deaf 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,5 +1,7 @@ PODS: - boost-for-react-native (1.63.0) + - BVLinearGradient (2.5.6): + - React - CocoaAsyncSocket (7.6.4) - CocoaLibEvent (1.0.0) - DoubleConversion (1.1.6) @@ -297,6 +299,7 @@ PODS: - Yoga (~> 1.14) DEPENDENCIES: + - BVLinearGradient (from `../node_modules/react-native-linear-gradient`) - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`) @@ -361,6 +364,8 @@ SPEC REPOS: - YogaKit EXTERNAL SOURCES: + BVLinearGradient: + :path: "../node_modules/react-native-linear-gradient" DoubleConversion: :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" FBLazyVector: @@ -414,6 +419,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c + BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872 CocoaAsyncSocket: 694058e7c0ed05a9e217d1b3c7ded962f4180845 CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2 diff --git a/package.json b/package.json index 7bee86c4..613c3491 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ }, "dependencies": { "react": "16.11.0", - "react-native": "0.62.2" + "react-native": "0.62.2", + "react-native-linear-gradient": "^2.5.6" }, "devDependencies": { "@babel/core": "^7.6.2", @@ -26,8 +27,8 @@ "eslint": "^6.5.1", "jest": "^24.9.0", "metro-react-native-babel-preset": "^0.58.0", - "react-test-renderer": "16.11.0", "prettier": "^2.0.4", + "react-test-renderer": "16.11.0", "typescript": "^3.8.3" }, "jest": { @@ -4983,6 +4983,11 @@ react-is@^16.12.0, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== +react-native-linear-gradient@^2.5.6: + version "2.5.6" + resolved "https://registry.yarnpkg.com/react-native-linear-gradient/-/react-native-linear-gradient-2.5.6.tgz#96215cbc5ec7a01247a20890888aa75b834d44a0" + integrity sha512-HDwEaXcQIuXXCV70O+bK1rizFong3wj+5Q/jSyifKFLg0VWF95xh8XQgfzXwtq0NggL9vNjPKXa016KuFu+VFg== + react-native@0.62.2: version "0.62.2" resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.62.2.tgz#d831e11a3178705449142df19a70ac2ca16bad10" |