-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #337 from bounswe/287/mobile-features
287/mobile features
- Loading branch information
Showing
4 changed files
with
96 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,61 @@ | ||
// QuizSolvingScreen.js | ||
import React, { useState } from 'react'; | ||
import { | ||
View, | ||
Text, | ||
StyleSheet, | ||
TouchableOpacity, | ||
Alert, | ||
View, | ||
Text, | ||
StyleSheet, | ||
TouchableOpacity, | ||
Alert, | ||
} from 'react-native'; | ||
|
||
const QuizHeader = ({ quizName, questionIndex, totalQuestions }) => { | ||
return ( | ||
<View style={styles.headerContainer}> | ||
{/* Quiz Name with rounded rectangle background */} | ||
<View style={styles.headerBox}> | ||
<Text style={styles.headerText}>{quizName}</Text> | ||
</View> | ||
<View style={styles.headerContainer}> | ||
{/* Quiz Name with rounded rectangle background */} | ||
<View style={styles.headerBox}> | ||
<Text style={styles.quizName}>{quizName}</Text> | ||
</View> | ||
|
||
{/* Question Number with rounded rectangle background */} | ||
<View style={styles.headerBox}> | ||
<Text style={styles.headerText}> | ||
Question {questionIndex + 1} / {totalQuestions} | ||
</Text> | ||
{/* Question Number with rounded rectangle background */} | ||
<View style={styles.headerBox}> | ||
<Text style={styles.questionCountText}> | ||
Question {questionIndex + 1} / {totalQuestions} | ||
</Text> | ||
</View> | ||
</View> | ||
</View> | ||
); | ||
}; | ||
|
||
|
||
const styles = StyleSheet.create({ | ||
headerContainer: { | ||
position: 'absolute', | ||
top: 50, // Adjust this to move it further from the top | ||
left: 20, | ||
right: 20, | ||
flexDirection: 'row', | ||
justifyContent: 'space-between', | ||
alignItems: 'center', | ||
paddingVertical: 10, | ||
}, | ||
headerBox: { | ||
backgroundColor: '#d3d3d3', // Light grey background color | ||
paddingVertical: 10, | ||
paddingHorizontal: 15, | ||
borderRadius: 10, // Rounded corners | ||
opacity: 0.9, // Slight opacity | ||
}, | ||
headerText: { | ||
fontSize: 18, | ||
fontWeight: 'bold', | ||
color: '#000000', // Black text | ||
}, | ||
headerContainer: { | ||
position: 'absolute', | ||
top: 50, // Adjust this to move it further from the top | ||
left: 20, | ||
right: 20, | ||
flexDirection: 'row', | ||
justifyContent: 'space-between', | ||
alignItems: 'center', | ||
paddingVertical: 10, | ||
}, | ||
headerBox: { | ||
backgroundColor: '#d3d3d3', // Light grey background color | ||
paddingVertical: 10, | ||
paddingHorizontal: 15, | ||
borderRadius: 10, // Rounded corners | ||
opacity: 0.9, // Slight opacity | ||
}, | ||
quizName: { | ||
fontSize: 18, | ||
fontWeight: 'bold', | ||
color: '#6a0dad', // Purple text | ||
}, | ||
questionCountText: { | ||
fontSize: 18, | ||
fontWeight: 'bold', | ||
color: '#000000', // Black text | ||
}, | ||
}); | ||
|
||
|
||
export default QuizHeader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters