3

I building a component to convert all icons to SVG.

So, at the end of my code I have this:

     return createElement('i',
        '<SVG>CODE</SVG>'
      )

Where is this SPAN, I should add a dynamic HTML! I could not find any option to do it. This HTML will be an SVG, so, for this reason, I need to add the full HTML.

Somebody had the same problem? What is missing?? How to make this as new HTML, when my component is running???

ps: I dont need to know how to create a SVG file, but yes, how render the HTML, that can be anyone, inside of my dynamic component.

Thanks

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
Cesar Cabral
  • 331
  • 4
  • 13

1 Answers1

8

I found a solution!

return createElement('i', {
          domProps: {
            innerHTML: this.data
          }
        }
      )
Cesar Cabral
  • 331
  • 4
  • 13