-
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.
Adds themes. Fix error message. Add more styling
- Loading branch information
Showing
25 changed files
with
301 additions
and
208 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
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,33 +1,26 @@ | ||
import React from 'react'; | ||
import {useTheme} from '@react-navigation/native'; | ||
import {StyleSheet, Text, View} from 'react-native'; | ||
|
||
interface Props { | ||
errorText1: string; | ||
errorText2: string; | ||
} | ||
|
||
class Error extends React.PureComponent<Props> { | ||
render() { | ||
const {errorText1, errorText2} = this.props; | ||
return ( | ||
<View style={styles.container}> | ||
<Text style={styles.text}>{errorText1}</Text> | ||
<Text style={styles.text}>{errorText2}</Text> | ||
</View> | ||
); | ||
} | ||
} | ||
import {TextStyles, ContainerStyles} from '../styles'; | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
}, | ||
text: { | ||
fontWeight: 'bold', | ||
color: 'red', | ||
}, | ||
}); | ||
const ErrorMessage = ({errorText1, errorText2}: Props) => { | ||
const {colors} = useTheme(); | ||
return ( | ||
<View style={ContainerStyles.welcomeContainer}> | ||
<Text style={[TextStyles.errorTitle, {color: colors.notification}]}> | ||
{errorText1} | ||
</Text> | ||
<Text style={[TextStyles.error, {color: colors.notification}]}> | ||
{errorText2} | ||
</Text> | ||
</View> | ||
); | ||
}; | ||
|
||
export default Error; | ||
export default ErrorMessage; |
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
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
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
Oops, something went wrong.