Can we add a class to the parent div based on the checked state of a checkbox? If not, what is the alternative method? Take a look at the code snippet below:
<div
class="checkbox-container"
v-for="item in items"
:key="item.id"
:class="{'checked': checkbox.checked}" // Would like to achieve this
>
<input type="checkbox" :id="item.id" :value="item.value" v-model="checkedItems">
<label :for="item.id">{{ item.text }}</label>
</div>