Newer
Older
<template>
<v-tooltip
:left="left"
:right="right"
:top="top || (!left && !right && !bottom)"
:bottom="bottom"
>
<template v-slot:activator="{ on, attrs }">
<span
v-bind="attrs"
v-on="on"
v-if="text"
:class="light ? 'text-light' : 'text'"
>{{ spaceBefore ? " " : "" }}{{ text }}{{ spaceAfter ? " " : "" }}</span
>
<span v-bind="attrs" v-on="on" v-if="icon">
<v-icon
:x-small="iconSize === 'x-small'"
:small="iconSize === 'small'"
:medium="iconSize === 'medium'"
:large="iconSize === 'large'"
:x-large="iconSize === 'x-large'"
:color="iconColor"
>{{ icon }}</v-icon
>
</span>
<div v-if="Array.isArray(tooltip)">
<p class="ma-0" v-for="line in tooltip" v-bind:key="line">{{ line }}</p>
</div>
<div v-else>
<p class="ma-0">{{ tooltip }}</p>
</div>
</v-tooltip>
</template>
<script>
export default {
name: "Wave",
props: {
text: {
type: String,
},
icon: {
type: String,
},
iconColor: {
type: String,
default: false,
},
spaceBefore: {
type: Boolean,
default: true,
},
spaceAfter: {
type: Boolean,
default: true,
},
},
};
</script>
<style lang="scss" scoped>
.text {
border-bottom: 1px dotted #333;
}