Skip to content

Commit

Permalink
Refactor #3832 and #3833 - For Panel
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Apr 5, 2023
1 parent e0b2b1d commit 4375930
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions api-generator/components/panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
10 changes: 5 additions & 5 deletions components/lib/panel/Panel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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
*/
Expand Down
4 changes: 2 additions & 2 deletions components/lib/panel/Panel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 4375930

Please sign in to comment.