-
Notifications
You must be signed in to change notification settings - Fork 3
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 #25 from leaonline/screens
changed all icons to use font-awesome-5, added new component task in …
- Loading branch information
Showing
14 changed files
with
196 additions
and
61 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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React from 'react' | ||
import { StyleSheet, View } from 'react-native' | ||
import { Button, Icon } from 'react-native-elements' | ||
import { TTSengine } from '../components/Tts' | ||
import Colors from '../constants/Colors' | ||
|
||
const Tts = TTSengine.component() | ||
|
||
/** | ||
* RouteButton contains an icon and a button. | ||
* @param {string} props.title: The displayed and spoken title | ||
* @param {string} props.icon: The icon for the button | ||
* @param {function} props.handleScreen The screen to be navigated | ||
* @returns {JSX.Element} | ||
* @constructor | ||
*/ | ||
const RouteButton = props => { | ||
return ( | ||
<View style={styles.body}> | ||
<Tts text={props.title} color={Colors.primary} id={6} testId='routeButton' dontShowText /> | ||
<Button icon={<Icon type='font-awesome-5' name={props.icon} size={25} color={Colors.primary} />} title={props.title} titleStyle={styles.buttonTitle} buttonStyle={{ borderRadius: 15 }} type='outline' onPress={props.handleScreen} /> | ||
</View> | ||
) | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
body: { | ||
flex: 1, | ||
flexDirection: 'row' | ||
}, | ||
buttonTitle: { | ||
color: Colors.primary, | ||
padding: 30, | ||
width: '75%' | ||
} | ||
}) | ||
|
||
export default RouteButton |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React from 'react' | ||
import { StyleSheet, Text, View } from 'react-native' | ||
import i18n from 'i18next' | ||
|
||
const ProfileScreen = props => { | ||
return ( | ||
<View style={styles.container}> | ||
<View style={styles.body}> | ||
<Text>Dein Profil</Text> | ||
</View> | ||
</View> | ||
|
||
) | ||
} | ||
|
||
ProfileScreen.navigationOptions = (navData) => { | ||
return { | ||
headerTitle: i18n.t('profileScreen.headerTitle') | ||
} | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
alignItems: 'center', | ||
margin: 30 | ||
}, | ||
body: { | ||
flex: 2, | ||
flexDirection: 'row' | ||
} | ||
}) | ||
|
||
export default ProfileScreen |
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.