Refactor #3832 and #3833 - For Panel

pull/3841/head
mertsincan 2023-04-05 09:07:25 +01:00
parent e0b2b1d34a
commit 4375930cc5
3 changed files with 9 additions and 9 deletions

View File

@ -60,8 +60,8 @@ const PanelSlots = [
description: "Custom content for the header's icon."
},
{
name: 'headericon',
description: "Custom content for the component's header icon."
name: 'togglericon',
description: "Custom content for the component's toggler icon."
},
{
name: 'footer',

View File

@ -61,9 +61,9 @@ export interface PanelPassThroughOptions {
*/
toggler?: PanelPassThroughOptionType;
/**
* Uses to pass attributes to the headericon's DOM element.
* Uses to pass attributes to the togglericon's DOM element.
*/
headericon?: PanelPassThroughOptionType;
togglericon?: PanelPassThroughOptionType;
/**
* Uses to pass attributes to the toggleablecontent's DOM element.
*/
@ -143,10 +143,10 @@ export interface PanelSlots {
*/
icons(): VNode[];
/**
* Custom header icon template of panel.
* @param {Object} scope - header icon slot's params.
* Custom toggler icon template of panel.
* @param {Object} scope - toggler icon slot's params.
*/
headericon(scope: {
togglericon(scope: {
/**
* Collapsed state as a boolean
*/

View File

@ -20,8 +20,8 @@
@keydown="onKeyDown"
v-bind="{ ...toggleButtonProps, ...ptm('toggler') }"
>
<slot name="headericon" :collapsed="d_collapsed">
<component :is="d_collapsed ? 'PlusIcon' : 'MinusIcon'" v-bind="ptm('headericon')" />
<slot name="togglericon" :collapsed="d_collapsed">
<component :is="d_collapsed ? 'PlusIcon' : 'MinusIcon'" v-bind="ptm('togglericon')" />
</slot>
</button>
</div>