Join Slack
Powered by
Hi , As painterResource isn't available in compose...
# compose-web
w
Waqas Tahir
01/16/2023, 11:50 AM
Hi , As painterResource isn't available in compose-web , What can I use as a workaround ? I have a lot of xml vector resources that I'd like to use in my project
➕ 1
n
Nikita Lipsky
01/16/2023, 1:08 PM
You may try to transform xml vector resources to code as workaround for now like here (
https://github.com/JetBrains/compose-jb/blob/master/experimental/examples/widgets-[…]kotlin/org/jetbrains/compose/demo/widgets/platform/Resources.kt
)
h
hfhbd
01/16/2023, 1:28 PM
BTW if you want to convert (web) svg files, you could also take a look at:
https://github.com/hfhbd/bootstrap-compose/blob/main/buildSrc/src/main/kotlin/app/softwork/bootstrapcompose/icons/ConvertSvg.kt
I converted the bootstrap icons to Kotlin compose web svg api
w
Waqas Tahir
01/16/2023, 2:09 PM
I use mainly material-design-icons , so I am converting all of them , in compose-icons repo
a
agrosner
01/16/2023, 11:09 PM
There’s also an intellij plugin for this.
https://plugins.jetbrains.com/plugin/18619-svg-to-compose
33
Views
Open in Slack
Previous
Next