UI Components
Typography
Typography
This is basically Text
component from npx create-expo-app. But I improved a little bit.
Now its better to use.
1
You can import the ThemedText
component like below:
2
You can use the ThemedText
component like below:
Initially, you don’t need to set color. It will be automatically set based on the theme. If dark mode is enabled, it will be white. Otherwise, it will be black.
But it is not done yet. You can make a header this ThemedText component.
1
If you want to look. Go to the @/components/common/ThemedText.tsx
file.
2
You will see:
3
type
is a prop that you can pass to the ThemedText
component. It will determine the style of the text.
Usage
You can use the ThemedText
component like below: