-
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.
style: add dm sans font and clean up styling (#18)
* Added DM Sans font. * Added color palette. * Updated all styling to use custom colors and typography.
- Loading branch information
1 parent
a5dd674
commit 3e1cb03
Showing
18 changed files
with
236 additions
and
312 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,9 +1,26 @@ | ||
import React from 'react'; | ||
import { Text } from 'react-native'; | ||
import { useFonts } from 'expo-font'; | ||
import { DMSans_400Regular, DMSans_700Bold } from '@expo-google-fonts/dm-sans'; | ||
import { DefaultTheme } from '@react-navigation/native'; | ||
import AppNavigator from '@/navigation/AppNavigator'; | ||
import colors from '@/styles/colors'; | ||
|
||
DefaultTheme.colors.background = '#FFFFFF'; | ||
DefaultTheme.colors.background = colors.white; | ||
|
||
export default function App() { | ||
const [fontsLoaded] = useFonts({ | ||
DMSans_400Regular, | ||
DMSans_700Bold, | ||
}); | ||
|
||
if (!fontsLoaded) { | ||
return null; | ||
} | ||
|
||
const defaultFontFamily = 'DMSans_400Regular'; | ||
(Text as any).defaultProps = (Text as any).defaultProps || {}; | ||
(Text as any).defaultProps.style = { fontFamily: defaultFontFamily }; | ||
|
||
return <AppNavigator />; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,61 +1,11 @@ | ||
import { StyleSheet } from 'react-native'; | ||
import colors from '@/styles/colors'; | ||
import typography from '@/styles/typography'; | ||
|
||
export const styles = StyleSheet.create({ | ||
loginContainer: { | ||
padding: 40, | ||
flex: 1, | ||
justifyContent: 'center', | ||
}, | ||
|
||
loginText: { | ||
fontSize: 40, | ||
fontWeight: 'bold', | ||
color: '#446127', | ||
}, | ||
|
||
logoContainer: { | ||
alignItems: 'center', | ||
paddingTop: 20, | ||
paddingBottom: 70, | ||
}, | ||
|
||
logo: { | ||
height: 200, | ||
marginTop: 20, | ||
marginBottom: 70, | ||
}, | ||
|
||
button: { | ||
backgroundColor: '#446127', | ||
padding: 15, | ||
borderRadius: 5, | ||
alignItems: 'center', | ||
marginBottom: 10, | ||
}, | ||
|
||
buttonText: { | ||
fontSize: 20, | ||
fontWeight: 'bold', | ||
color: '#FFFFFF', | ||
}, | ||
|
||
adminLoginContainer: { | ||
flex: 0, | ||
flexDirection: 'row', | ||
justifyContent: 'flex-end', | ||
paddingTop: 10, | ||
}, | ||
|
||
adminLoginText: { | ||
fontSize: 14, | ||
fontWeight: 'bold', | ||
color: '#828282', | ||
}, | ||
|
||
adminLoginLinkText: { | ||
fontSize: 14, | ||
fontWeight: 'bold', | ||
color: '#446127', | ||
...typography.smallBold, | ||
color: colors.primary, | ||
textDecorationLine: 'underline', | ||
}, | ||
}); |
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,61 +1,18 @@ | ||
import { StyleSheet } from 'react-native'; | ||
import colors from '@/styles/colors'; | ||
import typography from '@/styles/typography'; | ||
|
||
export const styles = StyleSheet.create({ | ||
loginContainer: { | ||
padding: 40, | ||
flex: 1, | ||
justifyContent: 'center', | ||
}, | ||
|
||
loginText: { | ||
fontSize: 40, | ||
fontWeight: 'bold', | ||
color: '#446127', | ||
}, | ||
|
||
logoContainer: { | ||
alignItems: 'center', | ||
paddingTop: 20, | ||
paddingBottom: 70, | ||
}, | ||
|
||
logo: { | ||
height: 200, | ||
marginTop: 20, | ||
marginBottom: 70, | ||
}, | ||
|
||
button: { | ||
backgroundColor: '#446127', | ||
backgroundColor: colors.primary, | ||
padding: 15, | ||
borderRadius: 5, | ||
alignItems: 'center', | ||
marginBottom: 10, | ||
}, | ||
|
||
buttonText: { | ||
fontSize: 20, | ||
fontWeight: 'bold', | ||
color: '#FFFFFF', | ||
}, | ||
|
||
adminLoginContainer: { | ||
flex: 0, | ||
flexDirection: 'row', | ||
justifyContent: 'flex-end', | ||
paddingTop: 10, | ||
}, | ||
|
||
adminLoginText: { | ||
fontSize: 14, | ||
fontWeight: 'bold', | ||
color: '#828282', | ||
}, | ||
|
||
adminLoginLinkText: { | ||
fontSize: 14, | ||
fontWeight: 'bold', | ||
color: '#446127', | ||
textDecorationLine: 'underline', | ||
...typography.largeBold, | ||
color: colors.white, | ||
}, | ||
}); |
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.