Skip to content

Commit

Permalink
some styling and navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeuler committed Nov 21, 2016
1 parent 9180d9d commit 895cdd2
Show file tree
Hide file tree
Showing 6 changed files with 192 additions and 54 deletions.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// @flow
import React from 'react';
import { View, Text } from 'react-native';
import { Icon } from 'react-native-elements';
import { Actions } from 'react-native-router-flux';

import styles from './FooterStyle';

Expand All @@ -10,6 +12,12 @@ type PropsType = {

const Footer = (props: PropsType) => (
<View style={styles.container}>
<Icon
raised
name='add'
color='#f50'
onPress={() => Actions.CommentsAdd()}
/>
</View>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ import { StyleSheet } from 'react-native';

const styles = StyleSheet.create({
container: {
height: 50,
backgroundColor: '#EFEFF2'
height: 70,
backgroundColor: '#EFEFF2',
alignItems: 'center',
justifyContent: 'center',
borderTopWidth: 1,
borderTopColor: '#D2D2D2',
},
});

Expand Down
6 changes: 3 additions & 3 deletions mobile/ReactNativeTutorial/app/setup/Router.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ import { Scene, Router, Reducer } from 'react-native-router-flux'
const reducerCreate = params => {
const defaultReducer = Reducer(params);
return (state, action)=>{
console.log(`Executing navigation action %c${action.type}`, 'color: #519C00');
console.log(`Executing navigation action`, action);
return defaultReducer(state, action);
}
};

export default () => (
<Router createReducer={reducerCreate} sceneStyle={{backgroundColor:'#F7F7F7', paddingTop: 66}}>
<Scene key="root">
<Scene key="comments/index" component={Index} title="Comments" initial={true} />
<Scene key="comments/add" component={Add} title="Add Comments" />
<Scene key="CommentsIndex" component={Index} title="Comments" initial={true} />
<Scene key="CommentsAdd" component={Add} title="Add comment" />
</Scene>
</Router>
)

0 comments on commit 895cdd2

Please sign in to comment.