Refactor #3832 Refactor #3833 - For Checkbox

This commit is contained in:
Tuğçe Küçükoğlu 2023-04-04 15:39:42 +03:00
parent 67e874d962
commit dbfbc31e8a
3 changed files with 29 additions and 4 deletions

View file

@ -20,12 +20,15 @@
/>
</div>
<div ref="box" :class="['p-checkbox-box', inputClass, { 'p-highlight': checked, 'p-disabled': disabled, 'p-focus': focused }]" :style="inputStyle">
<span :class="['p-checkbox-icon', { 'pi pi-check': checked }]"></span>
<slot name="icon" :checked="checked">
<component :is="checked ? 'CheckIcon' : null" class="p-checkbox-icon" />
</slot>
</div>
</div>
</template>
<script>
import CheckIcon from 'primevue/icon/check';
import { ObjectUtils } from 'primevue/utils';
export default {
@ -135,6 +138,9 @@ export default {
}
];
}
},
components: {
CheckIcon: CheckIcon
}
};
</script>