Regarding the kotlin-mui wrapper: How do I access ...
# javascript
m
Regarding the kotlin-mui wrapper: How do I access the theme inside the sx prop? @turansky JS/TS documentation of sx (We are currently using class components and will only migrate to function components in the future, so useTheme is not really an option in our case)
1
t
You can write custom
sx
extension for migration goals cc @Sergei Grishchenko
👍🏼 1
m
FYI: For the time being I just use a react context with the theme in my App.kt instead of the legacy mui withStyles/withTheme HOC
s
Also if you using function components,
useTheme
hook should be an option
m
True, my solution refers to legacy projects that are still using class components and don’t want to migrate “everything” at once