mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #3885 - button updates
This commit is contained in:
parent
21ab0ad7d0
commit
cadc7e87c4
8 changed files with 32 additions and 47 deletions
9
components/lib/inplace/Inplace.d.ts
vendored
9
components/lib/inplace/Inplace.d.ts
vendored
|
@ -7,7 +7,9 @@
|
|||
* @module inplace
|
||||
*
|
||||
*/
|
||||
|
||||
import { ButtonHTMLAttributes, HTMLAttributes, VNode } from 'vue';
|
||||
import { ButtonPassThroughOptions } from '../button';
|
||||
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
||||
|
||||
export declare type InplacePassThroughOptionType = InplacePassThroughAttributes | ((options: InplacePassThroughMethodOptions) => InplacePassThroughAttributes) | null | undefined;
|
||||
|
@ -39,12 +41,9 @@ export interface InplacePassThroughOptions {
|
|||
content?: InplacePassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the close button's DOM element.
|
||||
* @see {@link ButtonPassThroughOptions}
|
||||
*/
|
||||
closeButton?: InplacePassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the close icon's DOM element.
|
||||
*/
|
||||
closeIcon?: InplacePassThroughOptionType;
|
||||
closeButton?: ButtonPassThroughOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
</div>
|
||||
<div v-else class="p-inplace-content" v-bind="ptm('content')">
|
||||
<slot name="content"></slot>
|
||||
<IPButton v-if="closable" :aria-label="closeAriaLabel" @click="close" v-bind="{ ...closeButtonProps, ...ptm('closeButton') }">
|
||||
<IPButton v-if="closable" :aria-label="closeAriaLabel" @click="close" :pt="ptm('closeButton')" v-bind="closeButtonProps">
|
||||
<template #icon>
|
||||
<slot name="closeicon">
|
||||
<component :is="closeIcon ? 'span' : 'TimesIcon'" :class="closeIcon" v-bind="ptm('closeIcon')"></component>
|
||||
<component :is="closeIcon ? 'span' : 'TimesIcon'" :class="closeIcon" v-bind="ptm('closeButton')['icon']"></component>
|
||||
</slot>
|
||||
</template>
|
||||
</IPButton>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue