Skip to content

Commit 9e7a4c0

Browse files
committed
Design Upgrades
1 parent e94a5f9 commit 9e7a4c0

4 files changed

Lines changed: 20 additions & 32 deletions

File tree

app/components/AddNote/index.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,18 +105,17 @@ export default class AddNoteComponent extends React.Component {
105105
style={{ fontSize: 15, width: '90%' ,marginTop:30}}
106106
/>
107107

108-
<View style={{ marginHorizontal:'10%',marginTop:30 }}>
109-
<Button icon="send" mode="contained" onPress={data => handleSubmit(data)}>
108+
<View style={{marginTop:30, flexDirection:'row' }}>
109+
<Button icon="send" mode="contained" style={{marginHorizontal:'2%'}} onPress={data => handleSubmit(data)}>
110110
Submit
111111
</Button>
112+
{this.props.route.params.flag==1?
113+
<Button icon="delete-circle" mode="contained" style={{backgroundColor:'#D44638',marginHorizontal:'2%'}} onPress={()=>this.deleteNote()}>
114+
Delete
115+
</Button>:null}
112116
</View>
113117

114-
{this.props.route.params.flag==1?
115-
<View style={{ marginHorizontal:'10%',marginTop:30 }}>
116-
<Button icon="send" mode="contained" style={{backgroundColor:'#D44638'}} onPress={()=>this.deleteNote()}>
117-
Delete
118-
</Button>
119-
</View>:null}
118+
120119

121120

122121
</View>

app/components/Home.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export default Home = (props) => {
1515
console.log(refresh)
1616
const [index, setIndex] = React.useState(0);
1717
const routes = [
18-
{ key: 'notes', title: 'Notes', icon: 'playlist-edit' , color: '#009688',navigation:props.navigation,refresh:refresh,},
19-
{ key: 'about', title: 'About', icon: 'information-outline', color: '#795548',navigation:props.navigation },
18+
{ key: 'notes', title: 'Notes', icon: 'playlist-edit' , color: '#212121',navigation:props.navigation,refresh:refresh,},
19+
{ key: 'about', title: 'About', icon: 'information-outline', color: '#212121',navigation:props.navigation },
2020
];
2121

2222
const renderScene = BottomNavigation.SceneMap({
@@ -29,15 +29,7 @@ export default Home = (props) => {
2929
navigationState={{ index, routes }}
3030
onIndexChange={val => setIndex(val)}
3131
renderScene={renderScene}
32-
barStyle={{backgroundColor:'#212121',position: 'absolute',
33-
borderTopColor: 'rgba(0, 0, 0, 0.5)',
34-
elevation: 0,
35-
shadowColor: 'rgba(0, 0, 0, 0.5)',
36-
shadowOpacity: 0,
37-
shadowOffset: {
38-
height: 0,
39-
},
40-
shadowRadius: 0,}}
32+
shifting={true}
4133
/>
4234
);
4335
};

app/components/Notes/Notes.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default class NotesComponent extends React.Component {
6161
this.setState({notes:DATA,notes_len:DATA.length});
6262
}
6363

64-
64+
6565
rightHeader = () => {
6666
return (
6767
<View style={{alignItems:'center',justifyContent:'center',right:'10%'}}>
@@ -94,25 +94,24 @@ export default class NotesComponent extends React.Component {
9494
<ActivityIndicator size="large" color="white" />
9595
</View>
9696
:
97-
<View style={styles.body}>
97+
this.state.notes_len==0? <View style={{ flex: 1, backgroundColor:"#212121", justifyContent:'center',alignItems:'center'}}>
98+
<Paragraph style={{fontSize:20}}>It's lonely in here...</Paragraph>
99+
</View>
100+
:<View style={styles.body}>
98101

99102
<ScrollView >
100103
<FlatList
101104
data={this.state.notes}
102105
nestedScrollEnabled={true}
103-
style={{marginTop:10}}
106+
style={{marginTop:20}}
104107
renderItem={({ item }) => (
105-
this.state.notes_len==0?
106-
<View style={{ flex: 1, backgroundColor:"#212121", justifyContent:'center',alignItems:'center'}}>
107-
<Text>No Notes Yet</Text>
108-
</View>
109-
:
108+
110109
<TouchableOpacity
111110
style={{ flex: 1, flexDirection: 'column', margin: 1 ,marginBottom:30}}
112111
onPress={() => this.props.route.navigation.navigate('AddNoteComponent',{note:item,flag:1,navigation:this.props.route.navigation})}
113112
activeOpacity={0.2}
114113
>
115-
<View style={{borderColor:'#ddd',borderWidth:0.5,marginHorizontal:'2%',borderRadius:10}}>
114+
<View style={{borderColor:'#ddd',borderWidth:0.5,marginHorizontal:'8%',borderRadius:10}}>
116115
<View style={{backgroundColor:'#ddd',borderTopLeftRadius:10,borderTopRightRadius:10}}>
117116
<Title style={{alignContent:'center',alignItems:'center',alignSelf:'center',color:'black'}}>{item.title}</Title>
118117
</View>

app/setup/Navigation.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
} from '@react-navigation/stack';
1010
import Home from '../components/Home';
1111
import AddNoteComponent from '../components/AddNote/index';
12-
import SplashScreenContainer from '../components/SplashScreen/index';
12+
//import SplashScreenContainer from '../components/SplashScreen/index';
1313

1414

1515

@@ -43,9 +43,7 @@ export default class Start extends React.Component {
4343

4444
return (
4545

46-
this.state.isLoading?
47-
<SplashScreenContainer/>
48-
:
46+
4947
<NavigationContainer>
5048
<Stack.Navigator
5149
screenOptions={{

0 commit comments

Comments
 (0)