feat(Checkbox): add indeterminate state to icon slot scope

This adds the indeterminate state to the icon slot of the component so user will be able to customize the indeterminate icon.
This commit is contained in:
Michael Meier 2024-06-21 08:41:31 +02:00 committed by GitHub
parent 64a749c39a
commit 197715f102
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,7 +22,7 @@
v-bind="getPTOptions('input')"
/>
<div :class="cx('box')" v-bind="getPTOptions('box')">
<slot name="icon" :checked="checked" :class="cx('icon')">
<slot name="icon" :checked="checked" :indeterminate="d_indeterminate" :class="cx('icon')">
<CheckIcon v-if="checked" :class="cx('icon')" v-bind="getPTOptions('icon')" />
<MinusIcon v-else-if="d_indeterminate" :class="cx('icon')" v-bind="getPTOptions('icon')" />
</slot>