iconToSVG

external fun iconToSVG(icon: IconifyIcon, customisations: IconifyIconCustomisations? = definedExternally): IconifyIconBuildResult

Generate SVG attributes and body from an icon and customisations.

No style is generated, to stay compatible with frameworks that use style objects; the result contains an inline attribute instead, and the renderer should add vertical-align: -0.125em when it is true. Customisations are used as-is, so they should be normalised by the platform parser. Call replaceIDs to make IDs in the body unique.