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
// MyCustomScreen.js | |
import { TouchableOpacity } from 'react-native'; | |
import Text from '..(relative_path)/components/Text'; | |
const MyCustomScreen = () => ( | |
<> | |
<Text as="H1">This is the main title</Text> | |
<Text as="H2">This a secondary title</Text> |
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
// constants/fonts.js | |
/* | |
Define font constants so they are easy to refactor | |
if you need to change your pimary font | |
*/ | |
export const PRIMARY_FONT_REGULAR = 'NunitoSans-Regular'; | |
export const PRIMARY_FONT_SEMI = 'NunitoSans-SemiBold'; | |
export const PRIMARY_FONT_BOLD = 'NunitoSans-Bold'; |
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
import React, {useEffect, useRef} from 'react'; | |
import {View, Animated} from 'react-native'; | |
import useAnimate from 'hooks/useAnimate'; | |
const AnimatedView = () => { | |
const animatedOpacity = useAnimate({ | |
// fromValue: 0, (default) | |
// toValue: 1, (default) | |
duration: 1000, | |
}); |