Skip to content

Instantly share code, notes, and snippets.

@aguscha333
Last active June 1, 2021 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aguscha333/11911e87d42a510a35461a6d927e0a83 to your computer and use it in GitHub Desktop.
Save aguscha333/11911e87d42a510a35461a6d927e0a83 to your computer and use it in GitHub Desktop.
React Native Font System Code Usage
// 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>
<Text>This a normal paragraph</Text>
<TouchableOpacity onPress={() => {}}>
<Text as="H3" style={{ color: 'red'}}>Press Me!</Text>
</TouchableOpacity>
</>
);
export default MyCustomScreen;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment