All files / lib/components input-group.vue

58.33% Statements 7/12
30% Branches 3/10
75% Functions 3/4
58.33% Lines 7/12
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 4618x 18x 18x   18x 18x                     18x     18x                                                    
<template>
    <div :class="classObject" role="group">
    I    <slot name="left">
            <div v-if="left" class="input-group-addon" v-html="left"></div>
        </sElot>
 
        <slot></slot>

        <slot name="right">
            <div v-if="right" class="input-group-addon" v-html="right"></div>
        </slot>
    </div>
</template>
 
<script>
    export default {
        computed: {
            classObject() {
                return [
                    'input-group',
                    this.size ? ('input-group-' + this.size) : '',
                    this.state ? ('has-' + this.state) : ''
                ];
            }
        },
        props: {
            size: {
                type: String,
                default: null
            },
            state: {
                type: String,
                default: null
            },
            left: {
                type: String,
                default: null
            },
            right: {
                type: String,
                default: null
            }
        }
    };
</script>