Dialog pt updates

pull/3919/head
Tuğçe Küçükoğlu 2023-05-03 17:16:11 +03:00
parent d50cd9931d
commit df2505a697
3 changed files with 22 additions and 14 deletions

View File

@ -40,18 +40,21 @@ export interface ConfirmDialogPassThroughOptions {
*/ */
headerTitle?: ConfirmDialogPassThroughOptionType; headerTitle?: ConfirmDialogPassThroughOptionType;
/** /**
* Uses to pass attributes to the Button component. * Uses to pass attributes to the header icons' DOM element.
* @see {@link ButtonPassThroughOptions}
*/ */
closeButton?: ButtonPassThroughOptions; headerIcons?: ConfirmDialogPassThroughOptionType;
/**
* Uses to pass attributes to the close button's component.
*/
closeButton?: ConfirmDialogPassThroughOptionType;
/**
* Uses to pass attributes to the close button icon's component.
*/
closeButtonIcon?: ConfirmDialogPassThroughOptionType;
/** /**
* Uses to pass attributes to the content's DOM element. * Uses to pass attributes to the content's DOM element.
*/ */
content?: ConfirmDialogPassThroughOptionType; content?: ConfirmDialogPassThroughOptionType;
/**
* Uses to pass attributes to the footer's DOM element.
*/
footer?: ConfirmDialogPassThroughOptionType;
/** /**
* Uses to pass attributes to the icon's DOM element. * Uses to pass attributes to the icon's DOM element.
*/ */
@ -60,6 +63,10 @@ export interface ConfirmDialogPassThroughOptions {
* Uses to pass attributes to the message's DOM element. * Uses to pass attributes to the message's DOM element.
*/ */
message?: ConfirmDialogPassThroughOptionType; message?: ConfirmDialogPassThroughOptionType;
/**
* Uses to pass attributes to the footer's DOM element.
*/
footer?: ConfirmDialogPassThroughOptionType;
/** /**
* Uses to pass attributes to the Button component. * Uses to pass attributes to the Button component.
* @see {@link ButtonPassThroughOptions} * @see {@link ButtonPassThroughOptions}

View File

@ -8,7 +8,6 @@
* *
*/ */
import { HTMLAttributes, VNode } from 'vue'; import { HTMLAttributes, VNode } from 'vue';
import { ButtonPassThroughOptions } from '../button';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
export declare type DialogPassThroughOptionType = DialogPassThroughAttributes | ((options: DialogPassThroughMethodOptions) => DialogPassThroughAttributes) | null | undefined; export declare type DialogPassThroughOptionType = DialogPassThroughAttributes | ((options: DialogPassThroughMethodOptions) => DialogPassThroughAttributes) | null | undefined;
@ -51,10 +50,13 @@ export interface DialogPassThroughOptions {
*/ */
maximizableIcon?: DialogPassThroughOptionType; maximizableIcon?: DialogPassThroughOptionType;
/** /**
* Uses to pass attributes to the Button component. * Uses to pass attributes to the close button's component.
* @see {@link ButtonPassThroughOptions}
*/ */
closeButton?: ButtonPassThroughOptions; closeButton?: DialogPassThroughOptionType;
/**
* Uses to pass attributes to the close button icon's component.
*/
closeButtonIcon?: DialogPassThroughOptionType;
/** /**
* Uses to pass attributes to the content's DOM element. * Uses to pass attributes to the content's DOM element.
*/ */

View File

@ -32,11 +32,10 @@
@click="close" @click="close"
:aria-label="closeAriaLabel" :aria-label="closeAriaLabel"
type="button" type="button"
:pt="ptm('closeButton')" v-bind="{ ...closeButtonProps, ...ptm('closeButton') }"
v-bind="closeButtonProps"
> >
<slot name="closeicon"> <slot name="closeicon">
<component :is="closeIcon ? 'span' : 'TimesIcon'" :class="['p-dialog-header-close-icon', closeIcon]" v-bind="ptm('closeButton')['icon']"></component> <component :is="closeIcon ? 'span' : 'TimesIcon'" :class="['p-dialog-header-close-icon', closeIcon]" v-bind="ptm('closeButtonIcon')"></component>
</slot> </slot>
</button> </button>
</div> </div>