message slot added

pull/2892/head
Tuğçe Küçükoğlu 2022-08-26 09:31:31 +03:00
parent 93b6b04cdf
commit 67320fb0d8
3 changed files with 19 additions and 2 deletions

View File

@ -13,10 +13,18 @@ const ConfirmDialogProps = [
} }
]; ];
const ConfirmDialogSlots = [
{
name: "message",
description: "Custom content for the component."
}
];
module.exports = { module.exports = {
confirmdialog: { confirmdialog: {
name: "ConfirmDialog", name: "ConfirmDialog",
description: "ConfirmDialog uses a Dialog UI that is integrated with the Confirmation API.", description: "ConfirmDialog uses a Dialog UI that is integrated with the Confirmation API.",
props: ConfirmDialogProps props: ConfirmDialogProps,
slots: ConfirmDialogSlots
} }
}; };

View File

@ -1,4 +1,6 @@
import { VNode } from 'vue';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
import { ConfirmationOptions } from '../confirmationoptions';
export interface ConfirmDialogBreakpoints { export interface ConfirmDialogBreakpoints {
/** /**
@ -32,6 +34,13 @@ export interface ConfirmDialogProps {
} }
export interface ConfirmDialogSlots { export interface ConfirmDialogSlots {
/**
* Custom message template.
* @param {Object} scope - message slot's params.
*/
message: (scope: {
message: ConfirmationOptions;
}) => VNode[];
} }
export declare type ConfirmDialogEmits = { export declare type ConfirmDialogEmits = {

View File

@ -278,7 +278,7 @@ export default {
</table> </table>
</div> </div>
<h5>Slots</h5> <h5>Slots</h5>
<div class="doc-tablewrapper"> <div class="doc-tablewrapper">
<table class="doc-table"> <table class="doc-table">
<thead> <thead>