-
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.
feat: add unistyles and sample fonts
- Loading branch information
Showing
16 changed files
with
211 additions
and
42 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,4 +1,5 @@ | ||
/.expo | ||
node_modules | ||
ios | ||
android | ||
android | ||
expo-env.d.ts |
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
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,15 +1,26 @@ | ||
import { Text, View } from 'react-native'; | ||
import { createStyleSheet, useStyles } from 'react-native-unistyles'; | ||
|
||
const Page = () => { | ||
const { styles } = useStyles(stylesheet); | ||
|
||
export default function Index() { | ||
return ( | ||
<View | ||
style={{ | ||
flex: 1, | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
}} | ||
> | ||
<Text>Welcome to WaveZync 🌊</Text> | ||
<View style={styles.container}> | ||
<Text style={styles.text}>Welcome to WaveZync 🌊🚀</Text> | ||
</View> | ||
); | ||
} | ||
}; | ||
|
||
const stylesheet = createStyleSheet((theme) => ({ | ||
container: { | ||
flex: 1, | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
backgroundColor: theme.colors.background, | ||
}, | ||
text: { | ||
color: theme.colors.typography, | ||
}, | ||
})); | ||
|
||
export default Page; |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Constants | ||
|
||
App wide constants are defined here. |
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,9 @@ | ||
export const breakpoints = { | ||
xs: 0, | ||
sm: 576, | ||
md: 768, | ||
lg: 992, | ||
xl: 1200, | ||
superLarge: 2000, | ||
tvLike: 4000, | ||
} as const; |
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,27 @@ | ||
export const lightTheme = { | ||
colors: { | ||
typography: '#000000', | ||
background: '#ffffff', | ||
}, | ||
margins: { | ||
sm: 2, | ||
md: 4, | ||
lg: 8, | ||
xl: 12, | ||
}, | ||
} as const; | ||
|
||
export const darkTheme = { | ||
colors: { | ||
typography: '#ffffff', | ||
background: '#000000', | ||
}, | ||
margins: { | ||
sm: 2, | ||
md: 4, | ||
lg: 8, | ||
xl: 12, | ||
}, | ||
} as const; | ||
|
||
// define other themes |
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,23 @@ | ||
import { UnistylesRegistry } from 'react-native-unistyles'; | ||
import { breakpoints } from './breakpoints'; | ||
import { lightTheme, darkTheme } from './themes'; | ||
|
||
type AppBreakpoints = typeof breakpoints; | ||
type AppThemes = { | ||
light: typeof lightTheme; | ||
dark: typeof darkTheme; | ||
}; | ||
|
||
declare module 'react-native-unistyles' { | ||
export interface UnistylesBreakpoints extends AppBreakpoints {} | ||
export interface UnistylesThemes extends AppThemes {} | ||
} | ||
|
||
UnistylesRegistry.addBreakpoints(breakpoints) | ||
.addThemes({ | ||
light: lightTheme, | ||
dark: darkTheme, | ||
}) | ||
.addConfig({ | ||
adaptiveThemes: true, | ||
}); |
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 |
---|---|---|
|
@@ -5,6 +5,9 @@ | |
"paths": { | ||
"@/*": [ | ||
"./src/*" | ||
], | ||
"@assets/*": [ | ||
"./assets/*" | ||
] | ||
} | ||
}, | ||
|