Does anyone have experience using the `styledSvg{....
# javascript
m
Does anyone have experience using the
styledSvg{...}
? I am not clear on how to set the .svg file as the src for the image or how to set/change the
fill
property of the svg to change the color. Any advice would be appreciated.
t
m
yeah, well really I just can't get svgs to work with kotlin js
even the unstyled version
I would love to jsut see examples of people using Kotlin multiplatform to display pages with svgs
using the fill property to change color
t
require + parse works fine
I use
svg-inline-loader
for svg
m
is there an example I cna look at?
I'm pretty new at this, sorry
t
m
I'll take a look, thanks
t
Check
webpack.config.d
directory after build
rules
&
modules
a
to add the svg file, just use the image tag
styledImg(src="path/to/pic svg")
m
and how do you change the fill color @andylamax
I can't seem to find the fill property
I want the color to change on click/hover
a
that, I do not know how. How would you do it in html?
m
You would just set the fill for the svg using css
but...I cannot seem to be able to access any fill property when using kotlinx css