2018-06-27 14:38:27 +00:00
|
|
|
<template>
|
|
|
|
<div :class="classList" @click.self="$emit('clickItem')">
|
|
|
|
<div class="custom-control custom-checkbox d-flex">
|
|
|
|
<input type="checkbox" class="custom-control-input" :id="id"
|
|
|
|
:value="isChecked" @change="$emit('checkItem', isChecked)"
|
|
|
|
>
|
|
|
|
<label class="custom-control-label" :for="id"></label>
|
|
|
|
</div>
|
2018-09-20 12:39:21 +00:00
|
|
|
<div @click="$emit('clickItem')">
|
|
|
|
<slot></slot>
|
|
|
|
</div>
|
2018-06-27 14:38:27 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: ['id', 'isActive', 'isChecked'],
|
|
|
|
computed: {
|
|
|
|
classList() {
|
|
|
|
return ['list-group-item d-flex align-items-center', this.isActive ? 'bg-light' : ''];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|