Filip Wiesner
04/16/2023, 6:43 PMextraModifiers
) is there even if I add the modifier after the textfield style.David Herman
04/16/2023, 6:52 PMFilip Wiesner
04/16/2023, 6:58 PMDavid Herman
04/16/2023, 7:02 PMBut the global style order feature sounds cool!
Maybe! But this is an easy way to get yourself in trouble in larger codebases
Filip Wiesner
04/16/2023, 7:06 PMextraModifiers
and that also does not work. I guess I have to use the style in base {}
directlyI guess I have to use the style inAh, but I cannot use thedirectlybase {}
toModifier()
inside ComponentModifiers
block 😕David Herman
04/16/2023, 7:15 PMFilip Wiesner
04/16/2023, 7:36 PMDavid Herman
04/16/2023, 7:36 PMFilip Wiesner
04/16/2023, 7:38 PMDavid Herman
04/16/2023, 7:39 PMFilip Wiesner
04/16/2023, 7:45 PMval TextFieldStyle by ComponentStyle(extraModifiers = { TypographyTitleMedium.toModifier() }) { ... }
◦ this has default size of this text field defined using TypographyTitleMedium
component
• val TypographyTitleMedium by ComponentStyle.base { ... }
◦ used in the text field by default
• val TypographyHeadlineSmall by ComponentStyle.base { ... }
◦ used in a modifier when calling TextField
component
The problem: The TypographyTitleMedium
is defined after TypographyHeadlineSmall
so I cannot override the default TextField typography CSS class and I don't want to redefine the Typography component in the text field file.David Herman
04/16/2023, 7:53 PMFilip Wiesner
04/16/2023, 7:57 PMextraModifiers
but with 2 variants and the text field would have default variant (base would never be used)?
But using raw modifier instead of component style for the typography is good ideaDavid Herman
04/16/2023, 7:58 PMFilip Wiesner
04/16/2023, 8:01 PMDavid Herman
04/16/2023, 8:39 PM