mirror of
https://github.com/frappe/books.git
synced 2024-11-10 15:50:56 +00:00
22 lines
657 B
Vue
22 lines
657 B
Vue
|
<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>
|
||
|
<slot></slot>
|
||
|
</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>
|