Closed bastienrossi closed 2 years ago
@BastienMbz can we have separate tags? tag
, contentTag
, triggerTag
?
or maybe tag
can still apply to all 3 elements
contentTag
and triggerTag
(both nullable/optional) can override the tag
original value
<template>
<component :is="tag">
<component :is="triggerTag || tag" ref="trigger">
<slot name="trigger"></slot>
</component>
<component :is="contentTag || tag" ref="content">
<slot></slot>
</component>
</component>
</template
@KABBOUCHI Great idea.
I updated my pull request. I changed props due to issues with types in order to avoid regression.
{
props: {
to: undefined,
toSelector: undefined,
toElement: undefined,
content: undefined,
enabled: undefined,
visible: undefined,
triggerTarget: undefined,
tag: {
type: String,
default: "div"
},
triggerTag: String,
contentTag: String
}
}
Hi,
In some cases it can be useful to change the tags of the vue-tippy wrappers. Exemple: Using vue-tippy in
<a>
tag. All sub tags must be inline like<span>
and<div>
aren't valid. I suggest to add atag
attribute in order to let user choose.In order to add default props
tag
value todiv
I changed props array to object. But I'm not sure about all types. Can you check if there is no mistake ?Thanks