Skip to content

Commit

Permalink
FEATURE: Scores layout
Browse files Browse the repository at this point in the history
Designing scores template. *Not functional yet
  • Loading branch information
diogosilverio committed Feb 1, 2018
1 parent a3fcec9 commit 80f7e4b
Showing 1 changed file with 69 additions and 6 deletions.
75 changes: 69 additions & 6 deletions components/flashcards/Scores.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,78 @@
import React, { Component } from 'react';
import { Text, View } from 'react-native';
import { Text, View, ScrollView, StyleSheet } from 'react-native';

import { getScores } from '../../services';

import { COLOR_B_1 } from '../../utils/colors';

export default class Scores extends Component {

async componentDidMount() {
const scores = await getScores();
// console.log(scores);
}

render() {
return (
<View>
<Text>Scores</Text>
</View>
<ScrollView style={styles.container}>

<View style={styles.match}>
<View style={styles.resultContainer}>
<Text style={styles.resultText}>W</Text>
</View>
<View style={styles.statusContainer}>
<Text style={styles.statusText}>Deck 'A' @ 10/20/2017 19:22:40</Text>
</View>
</View>
<View style={styles.match}>
<View style={styles.resultContainerL}>
<Text style={styles.resultText}>L</Text>
</View>
<View style={styles.statusContainer}>
<Text style={styles.statusText}>Deck 'A' @ 10/20/2017 19:22:40</Text>
</View>
</View>

</ScrollView>
);
}
}


}
const styles = StyleSheet.create({
container: {
flex: 1
},
match: {
flex: 1,
flexDirection: 'row',
height: 64,
borderBottomWidth: 1,
borderBottomColor: COLOR_B_1
},
resultContainer: {
flex: 1,
backgroundColor: 'green',
alignItems: 'center',
justifyContent: 'center'
},
resultContainerL: {
flex: 1,
backgroundColor: 'red',
alignItems: 'center',
justifyContent: 'center'
},
resultText: {
color: 'white',
fontWeight: 'bold',
fontSize: 30
},
statusContainer: {
flex: 4,
alignItems: 'flex-start',
justifyContent: 'center',
paddingLeft: 5
},
statusText: {
fontSize: 17
}
});

0 comments on commit 80f7e4b

Please sign in to comment.