SplitButton icon pt fix

pull/3946/head
Tuğçe Küçükoğlu 2023-05-10 12:28:19 +03:00
parent 5a45168b8e
commit 82d2ede18a
2 changed files with 2 additions and 6 deletions

View File

@ -36,10 +36,6 @@ export interface SplitButtonPassThroughOptions {
* Uses to pass attributes to the button's DOM element.
*/
button?: SplitButtonPassThroughOptionType;
/**
* Uses to pass attributes to the icon's DOM element.
*/
icon?: SplitButtonPassThroughOptionType;
/**
* Uses to pass attributes to the Button component.
* @see {@link ButtonPassThroughOptions}

View File

@ -1,10 +1,10 @@
<template>
<div :class="containerClass" :style="style" v-bind="ptm('root')">
<slot>
<PVSButton type="button" class="p-splitbutton-defaultbutton" :label="label" :disabled="disabled" :aria-label="label" @click="onDefaultButtonClick" v-bind="{ ...buttonProps, ...ptm('button') }">
<PVSButton type="button" class="p-splitbutton-defaultbutton" :label="label" :disabled="disabled" :aria-label="label" @click="onDefaultButtonClick" :pt="ptm('button')" v-bind="buttonProps">
<template #icon="slotProps">
<slot name="icon">
<span :class="[icon, slotProps.class]" v-bind="ptm('icon')" />
<span :class="[icon, slotProps.class]" v-bind="ptm('button')['icon']" />
</slot>
</template>
</PVSButton>