From d88f69d9d0d6e2e91ebeca4b95ae8cdcc4b11ae7 Mon Sep 17 00:00:00 2001 From: juan Date: Wed, 27 Feb 2019 23:26:03 -0500 Subject: [PATCH] first commit with working example --- .gitignore | 8 +++++++ .watchmanconfig | 1 + App.js | 8 +++++++ app.json | 29 ++++++++++++++++++++++++ app/components/header.js | 18 +++++++++++++++ app/components/input.js | 31 ++++++++++++++++++++++++++ app/main.js | 47 +++++++++++++++++++++++++++++++++++++++ app/utils/colors.js | 11 +++++++++ assets/icon.png | Bin 0 -> 2976 bytes assets/splash.png | Bin 0 -> 7178 bytes babel.config.js | 6 +++++ package.json | 18 +++++++++++++++ 12 files changed, 177 insertions(+) create mode 100644 .gitignore create mode 100644 .watchmanconfig create mode 100644 App.js create mode 100644 app.json create mode 100644 app/components/header.js create mode 100644 app/components/input.js create mode 100644 app/main.js create mode 100644 app/utils/colors.js create mode 100644 assets/icon.png create mode 100644 assets/splash.png create mode 100644 babel.config.js create mode 100644 package.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..28b94e0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +node_modules/**/* +.expo/* +npm-debug.* +yarn.lock +*.jks +*.p12 +*.key +*.mobileprovision diff --git a/.watchmanconfig b/.watchmanconfig new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/.watchmanconfig @@ -0,0 +1 @@ +{} diff --git a/App.js b/App.js new file mode 100644 index 0000000..41b9dce --- /dev/null +++ b/App.js @@ -0,0 +1,8 @@ +// App.js +import React from 'react'; +import Main from './app/main'; +export default class App extends React.Component { + render() { + return
; + } +} \ No newline at end of file diff --git a/app.json b/app.json new file mode 100644 index 0000000..da8ea16 --- /dev/null +++ b/app.json @@ -0,0 +1,29 @@ +{ + "expo": { + "name": "My flash cards", + "slug": "flash_cards", + "privacy": "public", + "sdkVersion": "32.0.0", + "platforms": [ + "ios", + "android" + ], + "version": "1.0.0", + "orientation": "portrait", + "icon": "./assets/icon.png", + "splash": { + "image": "./assets/splash.png", + "resizeMode": "contain", + "backgroundColor": "#ffffff" + }, + "updates": { + "fallbackToCacheTimeout": 0 + }, + "assetBundlePatterns": [ + "**/*" + ], + "ios": { + "supportsTablet": true + } + } +} \ No newline at end of file diff --git a/app/components/header.js b/app/components/header.js new file mode 100644 index 0000000..e84e459 --- /dev/null +++ b/app/components/header.js @@ -0,0 +1,18 @@ +import React from 'react'; +import { View, Text, StyleSheet } from 'react-native'; +const Header = ({ title }) => ( + + {title.toUpperCase()} + +); +const styles = StyleSheet.create({ + headerContainer: { + marginTop: 40 + }, + headerText: { + color: 'white', + fontSize: 22, + fontWeight: '500' + } +}); +export default Header; \ No newline at end of file diff --git a/app/components/input.js b/app/components/input.js new file mode 100644 index 0000000..ac5d271 --- /dev/null +++ b/app/components/input.js @@ -0,0 +1,31 @@ +import React from 'react'; +import { StyleSheet, TextInput } from 'react-native'; +import { inputPlaceholder } from '../utils/colors'; +const Input = ({ inputValue, onChangeText, onDoneAddItem }) => ( + +); +const styles = StyleSheet.create({ + input: { + paddingTop: 10, + paddingRight: 15, + fontSize: 34, + color: 'white', + fontWeight: '500' + } +}); +export default Input; \ No newline at end of file diff --git a/app/main.js b/app/main.js new file mode 100644 index 0000000..b20a6e3 --- /dev/null +++ b/app/main.js @@ -0,0 +1,47 @@ + +import React from 'react'; +import { StyleSheet, Text, View, StatusBar } from 'react-native'; +import { LinearGradient } from 'expo'; +import { primaryGradientArray } from './utils/colors'; +import Header from './components/header'; +import Input from './components/input'; +const headerTitle = 'To Do'; +export default class Main extends React.Component { + state = { + inputValue: '' + }; + newInputValue = value => { + this.setState({ + inputValue: value + }); + }; + render() { + const { inputValue } = this.state; + return ( + + + +
+ + + + + + ); + } +} +const styles = StyleSheet.create({ + container: { + flex: 1 + }, + centered: { + alignItems: 'center' + }, + inputContainer: { + marginTop: 40, + paddingLeft: 15 + } +}); \ No newline at end of file diff --git a/app/utils/colors.js b/app/utils/colors.js new file mode 100644 index 0000000..a0a95f5 --- /dev/null +++ b/app/utils/colors.js @@ -0,0 +1,11 @@ +const primaryStart = '#f18a69'; +const primaryEnd = '#d13e60'; +export const primaryGradientArray = [primaryStart, primaryEnd]; +export const lightWhite = '#fcefe9'; +export const inputPlaceholder = '#f1a895'; +export const lighterWhite = '#f4e4e2'; +export const circleInactive = '#ecbfbe'; +export const circleActive = '#90ee90'; +export const itemListText = '#555555'; +export const itemListTextStrike = '#c4c4cc'; +export const deleteIconColor = '#bc2e4c'; diff --git a/assets/icon.png b/assets/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3f5bbc0ca199c3181d1f889011c7602e2daf51b9 GIT binary patch literal 2976 zcmb7GdpJ~E8{d03VSL6+jO&ad#5uV?nnaB;2npj-DVL;Bnha);gy~{RrN|{3lIT#! zHBrulQ6f%BCo+mMx#ix4kYTvc5G-P8%t z;tn{H1*bEQqxPb)ThcH#77JDEs=SKe{z0|4x2)~`+vXN(4#mXmikh2WZkU-Vzdm;Q z(huv}Z=)|OxHoQu<>%*%Ez;X2vz)m@51qc(*ldoQpPsThxe)FXzP5H|YHEt0rWVVv z`mxasmk?`|e)XIAn1Bx}dYxBj3gkTt(5dD!7gPPbxCbk$tLzUkFBCaIw#XA(kOg)8j<{ z_mNdPUQnb^d2A^Eo;XExC}=4_ys|u@VmvH^1g{Z1V0_qvTx4~O_xU{&8rm%W6CZr! z6j^2XuoA{mTGzHHIT_vE(^Gt%%k8c`_AX;zNZ*&19Ng2l{z2<1e_I z$GiXB6H2G=oO)a1+?F2E8-GZD)>Rhk)F5wI=DPvP6J1?6<4lN@hu@*kuHuVnX~_W${DPR$OH!duXn2ZlXs_+PZZs zYr3ya_t6TJ9mg_M-C!*?^4>}%LCc~*4v`wnYZXE9Mhr}6vj z)Vl{djon(U3xSBCq2b+vf&y9*(=T$R^)Jop&nKQF7MX}K6-IOh!?=!et;&WUjF^es zw{6?DT4m_B&-=)aKU~fHl9uqGI8`(^H>Z;bD@vE+4%6vggw0_F4-1+8qYW#ylY`Vd z#7TjBwx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<4J3`nD3Ng#h-{~}&K9l7rkQ&!fURW# z7j#k%{Oi*lZR^)#iPy@e!uG#bIRfJV~8@(;K zdVgj;mONP4ic%*Kx}QIPE?QVvNRRC`^YrvgOpE8W?hNnuM7~Ok_wBwaK2^LjSUZYh zO;2p$kKSPN;}g++uWWB_aDUt=3Sy5oD5Pr9mEenHA2?&K6C6JDr`KO*8g?M6-&So>jv&SWyF_qj#6>tGPRn zA{Rdb+J(>{u{~Khcd9GlmQP=O-28iRI(LJyX88TZ8sph~owye?L(bj89Fe}d(Ab&zlw0CZQ(OD{@-8z1YNxIViS!3J?hDi7 zbCS(&Egp!8nK!<;F$+!EV|0FCG}8Mx^;6`wG>h1;Mf>Vc)R2SDu-#D{4ktry@b6x8 zy*6>-?Y0U+mJ++%BJTTSM680yzr`);hcDynoldT{!{yTDuce|Hq42;a6BAm)y^{O4 zZ`*5FvPw#dL|V(4qe$bh@AmE6y%-FJQ<7ZF%EmVFRC#&1^))Yp+ze5YaoA1cXTyGPX#&>3HB6nX->MYM$h)K-0r$RnHC0%Q9K&_slB74L$BB^f8{bO zlCp9%=L2cerg)cY75CeU9UttziyilGIH`6=V|jJ+j``0UhYMcn2&=iIW9k{p>m==2 z_m)SGh6A0#zL03nvvH?XD+h@74wlD&n<}SHlf#~iU^s2r|31q q{6pHewK;{C+Z#SRjVy&NTMwQJaX3AELI$+lkdwWuT{$)2^uGb76$*O* literal 0 HcmV?d00001 diff --git a/assets/splash.png b/assets/splash.png new file mode 100644 index 0000000000000000000000000000000000000000..4f9ade699a4dc43aaf3c97ad983115cccd0e0640 GIT binary patch literal 7178 zcmeH~dpy(q`^QJpNTRw+H)SY?VndA0Ij399DT!{$X%4ZCnGhn?O=YPlIiEsKDTj&0 zh?2>WoHn8m8Ai_M-)BoOjF`m(8&^JPzGgp0VACPX~|2_(Rv3678ej2G4y8K5D)nHLE> zvzKAwkj)T+r-t}n;m?dy#9@FsZRun=}eM<<*gK|>r+`h5!+@1JS0zFRf{hQR_H zy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G!m@LwGW&fECI0mRK)REU(k-^&g)(l^z6deR~M Fe*iU3xyt|m literal 0 HcmV?d00001 diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 0000000..2900afe --- /dev/null +++ b/babel.config.js @@ -0,0 +1,6 @@ +module.exports = function(api) { + api.cache(true); + return { + presets: ['babel-preset-expo'], + }; +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..97ee7f9 --- /dev/null +++ b/package.json @@ -0,0 +1,18 @@ +{ + "main": "node_modules/expo/AppEntry.js", + "scripts": { + "start": "expo start", + "android": "expo start --android", + "ios": "expo start --ios", + "eject": "expo eject" + }, + "dependencies": { + "expo": "^32.0.0", + "react": "16.5.0", + "react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz" + }, + "devDependencies": { + "babel-preset-expo": "^5.0.0" + }, + "private": true +} \ No newline at end of file