Refactor #3965 - Update For SplitButton

pull/4011/head
Tuğçe Küçükoğlu 2023-05-30 17:59:16 +03:00
parent 16abc9e835
commit 2bd47577db
2 changed files with 3 additions and 5 deletions

View File

@ -50,9 +50,7 @@ const classes = {
}
],
button: 'p-splitbutton-defaultbutton',
icon: ({ props }) => props.icon,
menuButton: 'p-splitbutton-menubutton',
menuButtonIcon: ({ props }) => props.menuButtonIcon
menuButton: 'p-splitbutton-menubutton'
};
const { load: loadStyle } = useStyle(styles, { id: 'primevue_splitbutton_style', manual: true });

View File

@ -4,7 +4,7 @@
<PVSButton type="button" :class="cx('button')" :label="label" :disabled="disabled" :aria-label="label" @click="onDefaultButtonClick" :pt="ptm('button')" v-bind="buttonProps">
<template #icon="slotProps">
<slot name="icon">
<span :class="[cx('icon'), slotProps.class]" v-bind="ptm('button')['icon']" />
<span :class="[icon, slotProps.class]" v-bind="ptm('button')['icon']" />
</slot>
</template>
</PVSButton>
@ -24,7 +24,7 @@
>
<template #icon="slotProps">
<slot name="menubuttonicon">
<component :is="menuButtonIcon ? 'span' : 'ChevronDownIcon'" :class="[cx('menuButtonIcon'), slotProps.class]" v-bind="ptm('menuButton')['icon']" />
<component :is="menuButtonIcon ? 'span' : 'ChevronDownIcon'" :class="[menuButtonIcon, slotProps.class]" v-bind="ptm('menuButton')['icon']" />
</slot>
</template>
</PVSButton>