Closed nerijunior closed 2 years ago
This made intentionally to let you pass any arguments to the icon component like:
<bold-icon stroke-width="2" data-attr="value">
Please make sure that this still works.
@alex-oleshkevich If that's the idea we should use this.$attrs
instead of this.$data
, makes sense?
merged, thanks!
In https://github.com/alex-oleshkevich/vue-tabler-icons/blob/master/build.js#L24
...this.$data
will inject all the available data inside the element and it will cause errors when using libraries/plugins that adds data to Vue components like@vue/apollo-option
.Vue Apollo will allow all components in the application to have an
$apolloData
object insidethis.$data
and the Icon will try to put $apolloData inside the<svg {...allAttrs} ...
tag.It will cause: