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 0000000..3f5bbc0 Binary files /dev/null and b/assets/icon.png differ diff --git a/assets/splash.png b/assets/splash.png new file mode 100644 index 0000000..4f9ade6 Binary files /dev/null and b/assets/splash.png differ 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