diff --git a/api-generator/components/tristatecheckbox.js b/api-generator/components/tristatecheckbox.js index fc059d7aa..ea0e6b0c5 100644 --- a/api-generator/components/tristatecheckbox.js +++ b/api-generator/components/tristatecheckbox.js @@ -43,10 +43,26 @@ const TriStateCheckboxProps = [ } ]; +const TriStateCheckboxSlots = [ + { + name: 'checkicon', + description: 'Custom check icon template.' + }, + { + name: 'uncheckicon', + description: 'Custom uncheck icon template.' + }, + { + name: 'nullableicon', + description: 'Custom nullable icon template.' + } +]; + module.exports = { tristatecheckbox: { name: 'TriStateCheckbox', description: 'TriStateCheckbox is used to select either "true", "false" or "null" as the value.', - props: TriStateCheckboxProps + props: TriStateCheckboxProps, + slots: TriStateCheckboxSlots } }; diff --git a/components/lib/tristatecheckbox/TriStateCheckbox.d.ts b/components/lib/tristatecheckbox/TriStateCheckbox.d.ts index 4a2c1161f..538d8b046 100755 --- a/components/lib/tristatecheckbox/TriStateCheckbox.d.ts +++ b/components/lib/tristatecheckbox/TriStateCheckbox.d.ts @@ -7,7 +7,7 @@ * @module tristatecheckbox * */ -import { InputHTMLAttributes } from 'vue'; +import { InputHTMLAttributes, VNode } from 'vue'; import { ClassComponent, GlobalComponentConstructor, Nullable } from '../ts-helpers'; /** @@ -49,7 +49,20 @@ export interface TriStateCheckboxProps { /** * Defines valid slots in TriStateCheckbox component. */ -export interface TriStateCheckboxSlots {} +export interface TriStateCheckboxSlots { + /** + * Custom check icon template. + */ + checkicon(): VNode[]; + /** + * Custom uncheck icon template. + */ + uncheckicon(): VNode[]; + /** + * Custom nullable icon template. + */ + nullableicon(): VNode[]; +} /** * Defines valid emits in TriStateCheckbox component. diff --git a/components/lib/tristatecheckbox/TriStateCheckbox.vue b/components/lib/tristatecheckbox/TriStateCheckbox.vue index 2e82f32e4..1fdd6d0b6 100755 --- a/components/lib/tristatecheckbox/TriStateCheckbox.vue +++ b/components/lib/tristatecheckbox/TriStateCheckbox.vue @@ -18,12 +18,21 @@ {{ ariaValueLabel }}