Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Commit

Permalink
Successfully renders launch screen
Browse files Browse the repository at this point in the history
Note that I had to register the PrimaryNav component in index.ios.js
  • Loading branch information
alex-miller-0 committed Aug 7, 2017
1 parent d4cc405 commit be0a524
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 20 deletions.
5 changes: 1 addition & 4 deletions Components/LaunchScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default class LaunchScreen extends Component {

//openDevices() { this.state.navigate('Devices') }

/*render () {
render () {
this.state.navigate = this.props.navigation.navigate;
return (
<View style={styles.mainContainer}>
Expand All @@ -81,8 +81,5 @@ export default class LaunchScreen extends Component {
</ScrollView>
</View>
)
}*/
render () {
return (<Text>wassup</Text>)
}
}
2 changes: 1 addition & 1 deletion Styles/ApplicationStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ const ApplicationStyles = {
}
}

export default ApplicationStyles
exports.ApplicationStyles = ApplicationStyles
58 changes: 58 additions & 0 deletions Styles/Fonts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
const type = {
base: 'Avenir-Book',
bold: 'Avenir-Black',
emphasis: 'HelveticaNeue-Italic'
}

const size = {
h1: 38,
h2: 34,
h3: 30,
h4: 26,
h5: 20,
h6: 19,
input: 18,
regular: 17,
medium: 14,
small: 12,
tiny: 8.5
}

const style = {
h1: {
fontFamily: type.base,
fontSize: size.h1
},
h2: {
fontWeight: 'bold',
fontSize: size.h2
},
h3: {
fontFamily: type.emphasis,
fontSize: size.h3
},
h4: {
fontFamily: type.base,
fontSize: size.h4
},
h5: {
fontFamily: type.base,
fontSize: size.h5
},
h6: {
fontFamily: type.emphasis,
fontSize: size.h6
},
normal: {
fontFamily: type.base,
fontSize: size.regular
},
description: {
fontFamily: type.base,
fontSize: size.medium
}
}

exports.type = type
exports.style = style
exports.size = size
6 changes: 3 additions & 3 deletions Styles/LaunchScreenStyles.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { StyleSheet } from 'react-native'
import { Metrics } from './Metrics'
import { ApplicationStyles } from './ApplicationStyles'

export default StyleSheet.create({
...ApplicationStyles.screen,
container: {
paddingTop: Metrics.paddingTop,
paddingBottom: Metrics.baseMargin
},
logo: {
Expand All @@ -18,7 +21,4 @@ export default StyleSheet.create({
centered: {
alignItems: 'center'
},
section: {
backgroundColor:'blue'
}
})
1 change: 1 addition & 0 deletions Styles/Metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const metrics = {
marginHorizontal: 10,
marginVertical: 10,
section: 25,
paddingTop: 30,
baseMargin: 10,
doubleBaseMargin: 20,
smallMargin: 5,
Expand Down
15 changes: 3 additions & 12 deletions index.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,11 @@ import {
AppRegistry,
StyleSheet,
Text,
View
View,
Navigator,
} from 'react-native';
import PrimaryNav from './Navigation/AppNavigation'

export default class gridplus extends Component {
render() {
return (
<View style={styles.container}>
<PrimaryNav/>
</View>
);
}
}

const styles = StyleSheet.create({
container: {
flex: 1,
Expand All @@ -42,4 +33,4 @@ const styles = StyleSheet.create({
},
});

AppRegistry.registerComponent('gridplus', () => gridplus);
AppRegistry.registerComponent('gridplus', () => PrimaryNav);

0 comments on commit be0a524

Please sign in to comment.