[go: nahoru, domu]

Skip to content

Commit

Permalink
Changed book section style
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklavsM committed Jul 18, 2021
1 parent b01ac92 commit 045958d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
8 changes: 3 additions & 5 deletions client/components/PointsCircle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ const PointsCircle = () => {
height: 60,

borderRadius: 30,
borderWidth: 2,
borderColor: '#124BDD',
backgroundColor: '#F5F9FF',
backgroundColor: '#2C80FD',
justifyContent: 'center'
}}>
<Text style={{fontSize: 14, textAlign: 'center', color: '#124BDD', fontWeight: 'bold'}}>{Math.round(getRandomArbitrary(20, 35))}</Text>
<Text style={{fontSize: 14, textAlign: 'center', color: '#124BDD'}}>points</Text>
<Text style={{fontSize: 14, textAlign: 'center', color: 'white', fontWeight: 'bold'}}>{Math.round(getRandomArbitrary(20, 35))}</Text>
<Text style={{fontSize: 14, textAlign: 'center', color: 'white'}}>points</Text>
</View>
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { StyleSheet, Text, TouchableOpacity, View } from "react-native"
import {StyleSheet, Text, TouchableOpacity, View} from "react-native"

const BookSummarySection = ({title, author, category, description}) => {

Expand All @@ -12,7 +12,7 @@ const BookSummarySection = ({title, author, category, description}) => {
onPress={() => {
console.log("clicked")
}}>
<Text style={{margin: 20}}>{category}</Text>
<Text style={{margin: 20, color: "#124BDD",}}>{category}</Text>
</TouchableOpacity>
<Text>{description}</Text>
</View>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,29 @@ const CoverButtonsSection = ({title, imgUrl, navigation}: CoverButtonsSection &
<View style={styles.coverAndQuestions}>
<BookWIthPointsCardFullBookScreen imgUrl={imgUrl}/>
<View style={styles.buttons}>
{questions.length == 0 && <Text style={{width:120}}>Be the first to add a question!</Text>}
{questions.length == 0 && <Text style={styles.buttonText}>Be the first to add a question!</Text>}
<TouchableOpacity
style={{...styles.button, opacity: questions.length == 0 ? 0.4 : 1}}
disabled={questions.length == 0}
onPress={() => {
navigation.navigate("Book Quiz", {allQuestions: questions})
console.log("clicked")
}}>
<Text>Take a quiz</Text>
<Text style={styles.buttonText}>Take a quiz</Text>
</TouchableOpacity>
<TouchableOpacity
style={styles.button}
onPress={() => {
navigation.navigate("Add Question", {title})
}}>
<Text>Add a question</Text>
<Text style={styles.buttonText}>Add a question</Text>
</TouchableOpacity>
<TouchableOpacity
style={styles.button}
onPress={() => {
console.log("clicked")
}}>
<Text>Challenge a friend!</Text>
<Text style={styles.buttonText}>Challenge a friend!</Text>
</TouchableOpacity>
</View>
</View>
Expand All @@ -69,8 +69,8 @@ const styles = StyleSheet.create({
button: {
height: 35,
width: 150,
borderRadius: 3,
backgroundColor: "#dcdcdc",
borderRadius: 10,
backgroundColor: "#DFECFF",
justifyContent: 'center',
alignItems: 'center',
marginTop: '10%'
Expand All @@ -79,6 +79,9 @@ const styles = StyleSheet.create({
justifyContent: 'flex-end',
marginBottom: 25,

},
buttonText:{
color:"#124BDD",
}
})

Expand Down

0 comments on commit 045958d

Please sign in to comment.