├── .gitattributes ├── android ├── app │ ├── debug.keystore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ └── drawable │ │ │ │ │ ├── splashscreen_image.png │ │ │ │ │ └── splashscreen.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── teste2e │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── MainApplication.java │ │ │ └── AndroidManifest.xml │ │ └── debug │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ └── com │ │ │ └── teste2e │ │ │ └── ReactNativeFlipper.java │ ├── proguard-rules.pro │ ├── build_defs.bzl │ ├── BUCK │ └── build.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── settings.gradle ├── build.gradle ├── gradle.properties ├── gradlew.bat └── gradlew ├── tsconfig.json ├── ios ├── teste2e │ ├── Images.xcassets │ │ ├── Contents.json │ │ ├── SplashScreen.imageset │ │ │ ├── splashscreen.png │ │ │ └── Contents.json │ │ ├── SplashScreenBackground.imageset │ │ │ ├── background.png │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── main.m │ ├── AppDelegate.h │ ├── Supporting │ │ └── Expo.plist │ ├── Info.plist │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── SplashScreen.storyboard │ └── AppDelegate.m ├── Podfile └── teste2e.xcodeproj │ ├── xcshareddata │ └── xcschemes │ │ └── teste2e.xcscheme │ └── project.pbxproj ├── .buckconfig ├── babel.config.js ├── metro.config.js ├── app.json ├── src ├── components │ ├── Input │ │ ├── index.tsx │ │ └── styles.ts │ ├── Option │ │ ├── styles.ts │ │ └── index.tsx │ ├── Button │ │ ├── styles.ts │ │ └── index.tsx │ ├── Header │ │ ├── styles.ts │ │ └── index.tsx │ └── PlanInfo │ │ ├── styles.ts │ │ └── index.tsx └── screens │ └── Plan │ ├── styles.ts │ └── index.tsx ├── App.tsx ├── index.js ├── .gitignore └── package.json /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/app-teste2e/HEAD/android/app/debug.keystore -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true 4 | }, 5 | "extends": "expo/tsconfig.base" 6 | } -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | teste2e 3 | 4 | -------------------------------------------------------------------------------- /ios/teste2e/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "expo" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/app-teste2e/HEAD/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/app-teste2e/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/app-teste2e/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/app-teste2e/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/app-teste2e/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/app-teste2e/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/splashscreen_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/app-teste2e/HEAD/android/app/src/main/res/drawable/splashscreen_image.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/app-teste2e/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/app-teste2e/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/app-teste2e/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/app-teste2e/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/app-teste2e/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ios/teste2e/Images.xcassets/SplashScreen.imageset/splashscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/app-teste2e/HEAD/ios/teste2e/Images.xcassets/SplashScreen.imageset/splashscreen.png -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function(api) { 2 | api.cache(true); 3 | return { 4 | presets: ['babel-preset-expo'], 5 | plugins: ['react-native-reanimated/plugin'] 6 | }; 7 | }; 8 | -------------------------------------------------------------------------------- /metro.config.js: -------------------------------------------------------------------------------- 1 | // Learn more https://docs.expo.io/guides/customizing-metro 2 | const { getDefaultConfig } = require('expo/metro-config'); 3 | 4 | module.exports = getDefaultConfig(__dirname); 5 | -------------------------------------------------------------------------------- /ios/teste2e/Images.xcassets/SplashScreenBackground.imageset/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/app-teste2e/HEAD/ios/teste2e/Images.xcassets/SplashScreenBackground.imageset/background.png -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "name": "teste2e", 4 | "slug": "teste2e", 5 | "version": "1.0.0", 6 | "assetBundlePatterns": [ 7 | "**/*" 8 | ] 9 | }, 10 | "name": "teste2e" 11 | } 12 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /ios/teste2e/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | 11 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #FFFFFF 5 | 6 | -------------------------------------------------------------------------------- /src/components/Input/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { TextInput, TextInputProps } from 'react-native'; 3 | 4 | import { styles } from './styles'; 5 | 6 | export function Input({ ...rest }: TextInputProps) { 7 | return ( 8 | 12 | ); 13 | } -------------------------------------------------------------------------------- /src/components/Input/styles.ts: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | 3 | export const styles = StyleSheet.create({ 4 | input: { 5 | width: '100%', 6 | height: 50, 7 | borderRadius: 5, 8 | borderWidth: 1, 9 | borderColor: '#E8E8E8', 10 | paddingHorizontal: 12, 11 | marginVertical: 34 12 | }, 13 | }); -------------------------------------------------------------------------------- /App.tsx: -------------------------------------------------------------------------------- 1 | import 'react-native-gesture-handler'; 2 | 3 | import React from 'react'; 4 | import { Plan } from './src/screens/Plan'; 5 | import { StatusBar } from 'expo-status-bar'; 6 | 7 | export default function App() { 8 | return ( 9 | <> 10 | 11 | 12 | 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'teste2e' 2 | 3 | apply from: '../node_modules/react-native-unimodules/gradle.groovy' 4 | includeUnimodulesProjects() 5 | 6 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); 7 | applyNativeModulesSettingsGradle(settings) 8 | 9 | include ':app' 10 | -------------------------------------------------------------------------------- /ios/teste2e/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | #import 5 | 6 | #import 7 | 8 | @interface AppDelegate : UMAppDelegateWrapper 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /src/components/Option/styles.ts: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | 3 | export const styles = StyleSheet.create({ 4 | container: { 5 | height: 35, 6 | paddingHorizontal: 14, 7 | alignItems: 'center', 8 | justifyContent: 'center', 9 | borderRadius: 5 10 | }, 11 | active: { 12 | backgroundColor: '#FFFFFF', 13 | } 14 | }); -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/splashscreen.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/components/Button/styles.ts: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | 3 | export const styles = StyleSheet.create({ 4 | container: { 5 | backgroundColor: '#0085FF', 6 | padding: 12, 7 | alignItems: 'center', 8 | justifyContent: 'center', 9 | borderRadius: 5 10 | }, 11 | title: { 12 | color: '#FFF', 13 | fontSize: 16 14 | } 15 | }); -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | import 'react-native-gesture-handler'; 2 | import { registerRootComponent } from 'expo'; 3 | 4 | import App from './App'; 5 | 6 | // registerRootComponent calls AppRegistry.registerComponent('main', () => App); 7 | // It also ensures that whether you load the app in Expo Go or in a native build, 8 | // the environment is set up appropriately 9 | registerRootComponent(App); 10 | -------------------------------------------------------------------------------- /ios/teste2e/Images.xcassets/SplashScreen.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "idiom": "universal", 5 | "filename": "splashscreen.png", 6 | "scale": "1x" 7 | }, 8 | { 9 | "idiom": "universal", 10 | "scale": "2x" 11 | }, 12 | { 13 | "idiom": "universal", 14 | "scale": "3x" 15 | } 16 | ], 17 | "info": { 18 | "version": 1, 19 | "author": "expo" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/teste2e/Images.xcassets/SplashScreenBackground.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "idiom": "universal", 5 | "filename": "background.png", 6 | "scale": "1x" 7 | }, 8 | { 9 | "idiom": "universal", 10 | "scale": "2x" 11 | }, 12 | { 13 | "idiom": "universal", 14 | "scale": "3x" 15 | } 16 | ], 17 | "info": { 18 | "version": 1, 19 | "author": "expo" 20 | } 21 | } -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /src/components/Button/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { TouchableOpacity, TouchableOpacityProps, Text } from 'react-native'; 3 | 4 | import { styles } from './styles'; 5 | 6 | type Props = TouchableOpacityProps & { 7 | title: string; 8 | } 9 | export function Button({ title, ...rest }: Props) { 10 | return ( 11 | 16 | 17 | {title} 18 | 19 | 20 | ); 21 | } -------------------------------------------------------------------------------- /ios/teste2e/Supporting/Expo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | EXUpdatesSDKVersion 6 | 42.0.0 7 | EXUpdatesURL 8 | https://exp.host/@rodrigogsantana/teste2e 9 | EXUpdatesEnabled 10 | 11 | EXUpdatesCheckOnLaunch 12 | ALWAYS 13 | EXUpdatesLaunchWaitMs 14 | 0 15 | 16 | -------------------------------------------------------------------------------- /src/components/Header/styles.ts: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | 3 | export const styles = StyleSheet.create({ 4 | container: { 5 | width: '100%', 6 | flexDirection: 'row', 7 | justifyContent: 'space-between', 8 | alignItems: 'center', 9 | marginTop: 50, 10 | borderBottomWidth: 1, 11 | borderBottomColor: '#E8E8E8', 12 | paddingBottom: 33 13 | }, 14 | button: { 15 | flexDirection: 'row', 16 | }, 17 | title: { 18 | fontSize: 24, 19 | fontWeight: 'bold', 20 | color: '#1C1C1C' 21 | }, 22 | subtitle: { 23 | fontSize: 17 24 | } 25 | }); -------------------------------------------------------------------------------- /src/components/Option/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { TouchableOpacity, TouchableOpacityProps, Text } from 'react-native'; 3 | 4 | import { styles } from './styles'; 5 | 6 | type Props = TouchableOpacityProps & { 7 | title: string; 8 | active?: boolean; 9 | } 10 | export function Option({ 11 | title, 12 | active, 13 | ...rest 14 | }: Props) { 15 | return ( 16 | 21 | 22 | {title} 23 | 24 | 25 | ); 26 | } -------------------------------------------------------------------------------- /src/components/Header/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Feather } from '@expo/vector-icons'; 3 | import { View, Text } from 'react-native'; 4 | 5 | import { styles } from './styles'; 6 | 7 | export function Header() { 8 | return ( 9 | 10 | 11 | Your Plan 12 | 13 | 14 | 15 | 16 | Change 17 | 18 | 22 | 23 | 24 | ); 25 | } -------------------------------------------------------------------------------- /android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] 15 | lib_deps.append(":" + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | require_relative '../node_modules/react-native/scripts/react_native_pods' 2 | require_relative '../node_modules/react-native-unimodules/cocoapods.rb' 3 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 4 | 5 | platform :ios, '11.0' 6 | 7 | target 'teste2e' do 8 | use_unimodules! 9 | config = use_native_modules! 10 | 11 | use_react_native!(:path => config["reactNativePath"]) 12 | 13 | # Uncomment to opt-in to using Flipper 14 | # 15 | # if !ENV['CI'] 16 | # use_flipper!('Flipper' => '0.75.1', 'Flipper-Folly' => '2.5.3', 'Flipper-RSocket' => '1.3.1') 17 | # post_install do |installer| 18 | # flipper_post_install(installer) 19 | # end 20 | # end 21 | end 22 | -------------------------------------------------------------------------------- /src/components/PlanInfo/styles.ts: -------------------------------------------------------------------------------- 1 | import { StyleSheet, Dimensions } from 'react-native'; 2 | 3 | export const styles = StyleSheet.create({ 4 | planInfo: { 5 | width: '100%', 6 | borderBottomWidth: 1, 7 | borderBottomColor: '#E8E8E8', 8 | paddingBottom: 33, 9 | }, 10 | plan: { 11 | fontWeight: 'bold', 12 | fontSize: 18, 13 | marginBottom: 14, 14 | marginTop: 34 15 | }, 16 | price: { 17 | flexDirection: 'row', 18 | alignItems: 'flex-end', 19 | }, 20 | value: { 21 | fontWeight: 'bold', 22 | color: '#1C1C1C', 23 | fontSize: 32 24 | }, 25 | recurrence: { 26 | marginBottom: 7, 27 | color: '#585656' 28 | }, 29 | note: { 30 | color: '#8C8C8C', 31 | fontSize: 12 32 | }, 33 | }); -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | *.hprof 33 | 34 | # node.js 35 | # 36 | node_modules/ 37 | npm-debug.log 38 | yarn-error.log 39 | 40 | # BUCK 41 | buck-out/ 42 | \.buckd/ 43 | *.keystore 44 | !debug.keystore 45 | 46 | # Bundle artifacts 47 | *.jsbundle 48 | 49 | # CocoaPods 50 | /ios/Pods/ 51 | 52 | # Expo 53 | .expo/ 54 | web-build/ 55 | -------------------------------------------------------------------------------- /ios/teste2e/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "expo" 37 | } 38 | } -------------------------------------------------------------------------------- /src/components/PlanInfo/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { View, Text } from 'react-native'; 3 | 4 | import { styles } from './styles'; 5 | 6 | export type PlanInfoProps = { 7 | name: string; 8 | value: string; 9 | } 10 | 11 | export function PlanInfo({ name, value }: PlanInfoProps) { 12 | return ( 13 | 14 | 15 | {name} 16 | 17 | 18 | 19 | 20 | {value} 21 | 22 | 23 | /month 24 | 25 | 26 | 27 | 28 | Cancel anytime. Ofter terms apply. 29 | 30 | 31 | ); 32 | } -------------------------------------------------------------------------------- /src/screens/Plan/styles.ts: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | 3 | export const styles = StyleSheet.create({ 4 | container: { 5 | flex: 1, 6 | padding: 24, 7 | backgroundColor: '#FFF' 8 | }, 9 | options: { 10 | width: 200, 11 | backgroundColor: '#F7F7F7', 12 | flexDirection: 'row', 13 | justifyContent: 'space-between', 14 | alignItems: 'center', 15 | paddingHorizontal: 15, 16 | paddingVertical: 7, 17 | borderRadius: 5, 18 | alignSelf: 'flex-end', 19 | marginTop: 25 20 | }, 21 | details: { 22 | color: '#8C8C8C', 23 | textAlign: 'center', 24 | fontSize: 12, 25 | marginTop: 22 26 | }, 27 | confirmation: { 28 | fontWeight: 'bold', 29 | fontSize: 16, 30 | textAlign: 'center', 31 | marginTop: 12, 32 | color: '#0085FF', 33 | marginBottom: 12 34 | } 35 | }); -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 11 | 16 | 17 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "index.js", 3 | "scripts": { 4 | "android": "react-native run-android", 5 | "ios": "react-native run-ios", 6 | "web": "expo start --web", 7 | "start": "react-native start" 8 | }, 9 | "dependencies": { 10 | "expo": "~42.0.1", 11 | "expo-splash-screen": "~0.11.2", 12 | "expo-status-bar": "~1.0.4", 13 | "expo-updates": "~0.8.1", 14 | "react": "16.13.1", 15 | "react-dom": "16.13.1", 16 | "react-native": "~0.63.4", 17 | "react-native-gesture-handler": "~1.10.2", 18 | "react-native-reanimated": "~2.2.0", 19 | "react-native-screens": "~3.4.0", 20 | "react-native-unimodules": "~0.14.5", 21 | "react-native-web": "~0.13.12" 22 | }, 23 | "devDependencies": { 24 | "@babel/core": "^7.9.0", 25 | "@types/react": "~16.9.35", 26 | "@types/react-native": "~0.63.2", 27 | "typescript": "~4.0.0" 28 | }, 29 | "private": true 30 | } 31 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "29.0.3" 6 | minSdkVersion = 21 7 | compileSdkVersion = 30 8 | targetSdkVersion = 30 9 | } 10 | repositories { 11 | google() 12 | jcenter() 13 | } 14 | dependencies { 15 | classpath("com.android.tools.build:gradle:4.1.0") 16 | 17 | // NOTE: Do not place your application dependencies here; they belong 18 | // in the individual module build.gradle files 19 | } 20 | } 21 | 22 | allprojects { 23 | repositories { 24 | mavenLocal() 25 | maven { 26 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 27 | url("$rootDir/../node_modules/react-native/android") 28 | } 29 | maven { 30 | // Android JSC is installed from npm 31 | url("$rootDir/../node_modules/jsc-android/dist") 32 | } 33 | 34 | google() 35 | jcenter() 36 | maven { url 'https://www.jitpack.io' } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | # AndroidX package structure to make it clearer which packages are bundled with the 21 | # Android operating system, and which are packaged with your app's APK 22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 23 | android.useAndroidX=true 24 | 25 | # Automatically convert third-party libraries to use AndroidX 26 | android.enableJetifier=true 27 | 28 | # Version of flipper SDK to use with React Native 29 | FLIPPER_VERSION=0.54.0 30 | 31 | # The hosted JavaScript engine 32 | # Supported values: expo.jsEngine = "hermes" | "jsc" 33 | expo.jsEngine=jsc 34 | -------------------------------------------------------------------------------- /android/app/BUCK: -------------------------------------------------------------------------------- 1 | # To learn about Buck see [Docs](https://buckbuild.com/). 2 | # To run your application with Buck: 3 | # - install Buck 4 | # - `npm start` - to start the packager 5 | # - `cd android` 6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 8 | # - `buck install -r android/app` - compile, install and run application 9 | # 10 | 11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") 12 | 13 | lib_deps = [] 14 | 15 | create_aar_targets(glob(["libs/*.aar"])) 16 | 17 | create_jar_targets(glob(["libs/*.jar"])) 18 | 19 | android_library( 20 | name = "all-libs", 21 | exported_deps = lib_deps, 22 | ) 23 | 24 | android_library( 25 | name = "app-code", 26 | srcs = glob([ 27 | "src/main/java/**/*.java", 28 | ]), 29 | deps = [ 30 | ":all-libs", 31 | ":build_config", 32 | ":res", 33 | ], 34 | ) 35 | 36 | android_build_config( 37 | name = "build_config", 38 | package = "com.teste2e", 39 | ) 40 | 41 | android_resource( 42 | name = "res", 43 | package = "com.teste2e", 44 | res = "src/main/res", 45 | ) 46 | 47 | android_binary( 48 | name = "app", 49 | keystore = "//android/keystores:debug", 50 | manifest = "src/main/AndroidManifest.xml", 51 | package_type = "debug", 52 | deps = [ 53 | ":app-code", 54 | ], 55 | ) 56 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/teste2e/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.teste2e; 2 | 3 | import android.os.Bundle; 4 | 5 | import com.facebook.react.ReactActivity; 6 | import com.facebook.react.ReactActivityDelegate; 7 | import com.facebook.react.ReactRootView; 8 | import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView; 9 | 10 | import expo.modules.splashscreen.singletons.SplashScreen; 11 | import expo.modules.splashscreen.SplashScreenImageResizeMode; 12 | 13 | public class MainActivity extends ReactActivity { 14 | @Override 15 | protected void onCreate(Bundle savedInstanceState) { 16 | // Set the theme to AppTheme BEFORE onCreate to support 17 | // coloring the background, status bar, and navigation bar. 18 | // This is required for expo-splash-screen. 19 | setTheme(R.style.AppTheme); 20 | super.onCreate(null); 21 | // SplashScreen.show(...) has to be called after super.onCreate(...) 22 | // Below line is handled by '@expo/configure-splash-screen' command and it's discouraged to modify it manually 23 | SplashScreen.show(this, SplashScreenImageResizeMode.CONTAIN, ReactRootView.class, false); 24 | } 25 | 26 | 27 | /** 28 | * Returns the name of the main component registered from JavaScript. 29 | * This is used to schedule rendering of the component. 30 | */ 31 | @Override 32 | protected String getMainComponentName() { 33 | return "main"; 34 | } 35 | 36 | @Override 37 | protected ReactActivityDelegate createReactActivityDelegate() { 38 | return new ReactActivityDelegate(this, getMainComponentName()) { 39 | @Override 40 | protected ReactRootView createRootView() { 41 | return new RNGestureHandlerEnabledRootView(MainActivity.this); 42 | } 43 | }; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /ios/teste2e/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleSignature 18 | ???? 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSAppTransportSecurity 26 | 27 | NSAllowsArbitraryLoads 28 | 29 | NSExceptionDomains 30 | 31 | localhost 32 | 33 | NSExceptionAllowsInsecureHTTPLoads 34 | 35 | 36 | 37 | 38 | UILaunchStoryboardName 39 | SplashScreen 40 | UIRequiredDeviceCapabilities 41 | 42 | armv7 43 | 44 | UISupportedInterfaceOrientations 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | UIViewControllerBasedStatusBarAppearance 51 | 52 | UIStatusBarStyle 53 | UIStatusBarStyleDefault 54 | 55 | 56 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/screens/Plan/index.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react'; 2 | import { View, Text, TouchableWithoutFeedback, Keyboard } from 'react-native'; 3 | 4 | import { Input } from '../../components/Input'; 5 | import { Header } from '../../components/Header'; 6 | import { Option } from '../../components/Option'; 7 | import { Button } from '../../components/Button'; 8 | import { PlanInfo, PlanInfoProps } from '../../components/PlanInfo'; 9 | 10 | import { styles } from './styles'; 11 | 12 | export function Plan() { 13 | const [plan, setPlan] = useState({ name: 'Basic', value: '5.25' }); 14 | const [emailSent, setEmailSent] = useState(false); 15 | 16 | function handleChangePlan(plan: string) { 17 | if (plan === 'basic') { 18 | setPlan({ 19 | name: 'Basic', 20 | value: '5.25' 21 | }); 22 | } else { 23 | setPlan({ 24 | name: 'Premium', 25 | value: '6.99' 26 | }); 27 | } 28 | } 29 | 30 | function handleSubscribe() { 31 | setEmailSent(true); 32 | } 33 | 34 | return ( 35 | 36 | 37 |
38 | 39 | 43 | 44 | 45 | 57 | 58 | 62 | 63 | { 64 | emailSent && 65 | 66 | We send you a {'\n'} 67 | confirmation email. 68 | 69 | } 70 | 71 |