Hi guys, I'm converting a react app to Kotlin. How...
# react
j
Hi guys, I'm converting a react app to Kotlin. How should I replace relative CSS and PNG imports? Side question, I've tried
kotlin-styled
for CSS, but then how to declare a
background = "url('myImage.png')"
with a path relative to the current file?
c
backgroundImage = Image("url('/images/muirwik-logo.png')" worked for me
j
Thanks ! I see, I could also get it to work with the
background
property, but it requires an absolute path or a path relative to the current URL. I can't get it to work with a path relative to the file it's declared in, like with image imports in standard create-react-app