I want to inline svg icons using strings so that I...
# kotlinx-html
a
I want to inline svg icons using strings so that I don't have to rewrite them manually in kotlinx-html I often have the icons as functions like this:
Copy code
suspend fun DIV.Download(classes: String="") {
    unsafe {
        +"""
        <svg xmlns="<http://www.w3.org/2000/svg>" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="$classes"><path d="M12 15V3"/><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><path d="m7 10 5 5 5-5"/></svg>
    """.trimIndent()
    }
}
However I want to be able to use them from any tag (ie inside
div
or
a
. What should i use as the receiver type?
I tried using a 'generic' tag like FlowContent, but that doesnt allow
unsafe