https://kotlinlang.org logo
#compose
Title
# compose
f

fabio.carballo

10/09/2020, 11:36 AM
hey, what is the recommended approach (if any) to model the color of enabled/disabled states for a specific
Typography
? in the previous theming system we relied in
color selectors
. I guess there is nothing equivalent in Compose.
n

nickbutcher

10/09/2020, 1:50 PM
Copy code
val emphasis = AmbientEmphasisLevels.current
ProvideEmphasis(if (enabled) emphasis.high else emphasis.disabled) {
  Text(…)
}
n

nglauber

10/09/2020, 3:51 PM
@nickbutcher is this the same?
Copy code
val emphasis = EmphasisAmbient.current
n

nickbutcher

10/09/2020, 3:54 PM
f

fabio.carballo

10/14/2020, 2:34 PM
thanks!
2 Views