how to add additional TextStyle? For example when we have 20 TextStyle in figma #254
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi! you have 2 options, it will depend if that will be used multiple times or only once. AppTheme.typography.subtitle1.copy(color = AppTheme.colors.linkTextColor) If you are in the other case, if you will use it multiple times, I'd recommend you to include it in your app theme. Some time ago I wrote a blog post that explain how to extend the material theme, you can check it here! https://blog.xmartlabs.com/blog/extending-material-theme-in-jetpack-compose/ |
Beta Was this translation helpful? Give feedback.
Hi! you have 2 options, it will depend if that will be used multiple times or only once.
If you have multiple TS with minor adjustments, and you will use it just once, you can change it when you are creating your composable, something like:
If you are in the other case, if you will use it multiple times, I'd recommend you to include it in your app theme.
To do that you have to add the new text style to the
AppTypography
class. Gong has already included two custom text styles. If you want to include a new one, you have to declare it in this class and then instantiate it hereSome time ago I wrote a blog post that exp…