Vue.component('tt-tooltip', { props: { text: { type: String, required: true, default: 'Tooltip text' }, position: { type: String, default: 'top', // Options: top, bottom, left, right validator: function (value) { // The value must match one of these strings return ['top', 'bottom', 'left', 'right'].indexOf(value) !== -1; } }, allowWrapping: { type: Boolean, default: false } }, data() { return { showTooltip: true }; }, template: `
{{ text }}
` });