All files / lib/components popover.vue

63.64% Statements 7/11
50% Branches 3/6
100% Functions 3/3
63.64% Lines 7/11
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 4818x 18x 18x   18x 18x                     18x     18x                                                        
<template>
    <div>
    I    <span ref="trigger"><slot></slot></span>
        <div :class="['popover', 'fade', classState ? 'show' : '', popoverAlignment]"
           E  :style="popoverStyle"
             tabindex="-1"
             ref="popover"
             @focus="$emit('focus')"
             @blur="$emit('blur')"
        >
            <div class="popover-arrow"></div>
            <h3 :is="titletag" class="popover-title" v-if="title" v-html="title"></h3>
            <div class="popover-content">
                <div class="popover-content-wrapper">
                    <slot name="content"><span v-html="content"></span></slot>
                </div>
            </div>
        </div>
    </div>
</template>
 
<script>
    import { popoverMixin } from '../mixins';
 
    export default {
        mixins: [popoverMixin],
        props: {
            title: {
                type: String,
                default: ''
            },
            titleTag: {
                type: String,
                default: 'h3'
            },
            content: {
                type: String,
                default: ''
            },
            popoverStyle: {
                type: Object,
                default: null
            }
        }
    };
 
</script>