diff --git a/src/NotesMainPanel.js b/src/NotesMainPanel.js index dd1fa60..5635c3b 100644 --- a/src/NotesMainPanel.js +++ b/src/NotesMainPanel.js @@ -7,10 +7,12 @@ import React from 'react'; import { Alert, AppRegistry, + Button, Dimensions, FlatList, NativeModules, StyleSheet, + Text, View, } from 'react-native'; import NoteWidget from './Widgets/NoteWidget'; @@ -63,12 +65,33 @@ class NotesMainPanel extends React.Component { return }; - render() { + + renderWelcomePage = () => { + return( + + ReactNativeNotes + Create your first note by clicking + + + on the navigation panel + + ) + }; + + renderNotesPage = () => { return( - ); + ) + } + + render() { + if(this.state.notes.length > 0){ + return this.renderNotesPage(); + } + else { + return this.renderWelcomePage(); + } } }; @@ -81,9 +104,26 @@ const styles = StyleSheet.create({ backgroundColor: "transparent", justifyContent: "space-around", }, - welcomeText: { - fontSize: 25, - fontFamily: "Papyrus", + welcomePage: { + flex: 1, + justifyContent: "center", + alignItems: "center" + }, + logoText: { + fontSize: 35, + margin: 25, + color: "white" + }, + plusIcon: { + fontSize: 30, + fontWeight: "bold", + color: "white" + }, + introductionText: { + fontSize: 18, + margin: 0, + fontFamily: "Calibri", + color: "white" } });