mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #3889 - button updates
This commit is contained in:
parent
4fe92f03ef
commit
21ab0ad7d0
4 changed files with 12 additions and 15 deletions
8
components/lib/splitbutton/SplitButton.d.ts
vendored
8
components/lib/splitbutton/SplitButton.d.ts
vendored
|
@ -8,6 +8,7 @@
|
|||
*
|
||||
*/
|
||||
import { ButtonHTMLAttributes, VNode } from 'vue';
|
||||
import { ButtonPassThroughOptions } from '../button';
|
||||
import { MenuItem } from '../menuitem';
|
||||
import { TieredMenuPassThroughOptions } from '../tieredmenu';
|
||||
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
||||
|
@ -41,12 +42,9 @@ export interface SplitButtonPassThroughOptions {
|
|||
icon?: SplitButtonPassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the menu button's DOM element.
|
||||
* @see {@link ButtonPassThroughOptions}
|
||||
*/
|
||||
menuButton?: SplitButtonPassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the menu button icon's DOM element.
|
||||
*/
|
||||
menuButtonIcon?: SplitButtonPassThroughOptionType;
|
||||
menuButton?: ButtonPassThroughOptions;
|
||||
/**
|
||||
* Uses to pass attributes to the menu's DOM element.
|
||||
* @see {@link TieredMenuPassThroughOptions}
|
||||
|
|
|
@ -19,11 +19,12 @@
|
|||
:aria-controls="ariaId + '_overlay'"
|
||||
@click="onDropdownButtonClick"
|
||||
@keydown="onDropdownKeydown"
|
||||
v-bind="{ ...menuButtonProps, ...ptm('menuButton') }"
|
||||
:pt="ptm('menuButton')"
|
||||
v-bind="menuButtonProps"
|
||||
>
|
||||
<template #icon="slotProps">
|
||||
<slot name="menubuttonicon">
|
||||
<component :is="menuButtonIcon ? 'span' : 'ChevronDownIcon'" :class="[menuButtonIcon, slotProps.class]" v-bind="ptm('menuButtonIcon')" />
|
||||
<component :is="menuButtonIcon ? 'span' : 'ChevronDownIcon'" :class="[menuButtonIcon, slotProps.class]" v-bind="ptm('menuButton')['icon']" />
|
||||
</slot>
|
||||
</template>
|
||||
</PVSButton>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue