-
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.
* added header * header styling * compartmentalized some more --------- Co-authored-by: philipye314 <[email protected]>
- Loading branch information
1 parent
45a4464
commit 68440e2
Showing
10 changed files
with
430 additions
and
123 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,22 @@ | ||
import { Text, TouchableOpacity } from 'react-native'; | ||
import { useNavigation } from '@react-navigation/native'; | ||
import BackArrow from 'src/assets/images/back-arrow.svg'; | ||
import styles from './styles'; | ||
|
||
interface BackButtonProps { | ||
label: string; // The string prop for the button label | ||
} | ||
|
||
export default function BackButton({ label }: BackButtonProps) { | ||
const navigation = useNavigation(); | ||
|
||
return ( | ||
<TouchableOpacity | ||
onPress={() => navigation.goBack()} | ||
style={styles.backContainer} | ||
> | ||
<BackArrow /> | ||
<Text style={styles.backText}>{label}</Text> | ||
</TouchableOpacity> | ||
); | ||
} |
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,17 @@ | ||
import { StyleSheet } from 'react-native'; | ||
import { colors } from 'src/styles/colors'; | ||
|
||
export default StyleSheet.create({ | ||
backContainer: { | ||
position: 'absolute', | ||
left: 0, | ||
flexDirection: 'row', | ||
alignItems: 'center', | ||
marginLeft: 0, | ||
}, | ||
|
||
backText: { | ||
fontSize: 17, | ||
color: colors.grey, | ||
}, | ||
}); |
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 |
---|---|---|
@@ -1,16 +1,59 @@ | ||
import React from 'react'; | ||
import { Text, View } from 'react-native'; | ||
import { createNativeStackNavigator } from '@react-navigation/native-stack'; | ||
import Logo from 'src/assets/images/logo.svg'; | ||
import { colors } from 'src/styles/colors'; | ||
import LegalRights from '@/screens/LegalRights'; | ||
import VideoPage from '@/screens/LegalRights/VideoPage'; | ||
import BackButton from '../../components/BackButton'; | ||
import { LegalStackParams } from '../types'; | ||
|
||
const LegalStack = createNativeStackNavigator<LegalStackParams>(); | ||
|
||
export default function LegalRightsNavigator() { | ||
return ( | ||
<LegalStack.Navigator> | ||
<LegalStack.Navigator | ||
screenOptions={{ | ||
headerShown: true, | ||
headerTitleAlign: 'left', | ||
headerTitle: '', | ||
headerStyle: { | ||
backgroundColor: colors.background, | ||
}, | ||
headerLeft: () => ( | ||
<Text | ||
style={{ | ||
fontSize: 20, | ||
fontWeight: 'bold', | ||
color: colors.orange, | ||
marginLeft: 10, | ||
}} | ||
> | ||
Legal Rights | ||
</Text> | ||
), | ||
headerRight: () => ( | ||
<View style={{ paddingRight: '2%' }}> | ||
<Logo /> | ||
</View> | ||
), | ||
}} | ||
> | ||
<LegalStack.Screen name="LegalRights" component={LegalRights} /> | ||
<LegalStack.Screen name="VideoPage" component={VideoPage} /> | ||
<LegalStack.Screen | ||
name="VideoPage" | ||
component={VideoPage} | ||
options={{ | ||
headerBackTitle: 'Legal Rights', | ||
headerTitle: '', | ||
headerLeft: () => <BackButton label={'Legal Rights'} />, | ||
headerRight: () => ( | ||
<View style={{ paddingRight: '2%' }}> | ||
<Logo /> | ||
</View> | ||
), | ||
}} | ||
/> | ||
</LegalStack.Navigator> | ||
); | ||
} |
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,4 +1,5 @@ | ||
export const colors = { | ||
orange: '#E37F1D', | ||
grey: '#757575', | ||
background: '#F7F9FC', | ||
}; |