Skip to content

how to add additional TextStyle? For example when we have 20 TextStyle in figma #254

Answered by mirland
DigitalKoi asked this question in Q&A
Discussion options

You must be logged in to vote

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:

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.
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 here

Some time ago I wrote a blog post that exp…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mirland
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants