From 46db4dff634bd48d404985a3c69c233c0996d214 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Wed, 1 Dec 2021 16:43:18 +0300 Subject: [PATCH] Fixed #1836 - For InlineMessage --- .../inlinemessage/InlineMessage.d.ts | 40 ++++++++++++++++--- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/src/components/inlinemessage/InlineMessage.d.ts b/src/components/inlinemessage/InlineMessage.d.ts index 05e53f6f7..cb854fc46 100755 --- a/src/components/inlinemessage/InlineMessage.d.ts +++ b/src/components/inlinemessage/InlineMessage.d.ts @@ -1,14 +1,42 @@ import { VNode } from 'vue'; +import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; -interface InlineMessageProps { - severity?: string; +type InlineMessageSeverityType = 'success' | 'info' | 'warn' | 'error'; + +export interface InlineMessageProps { + /** + * Severity level of the message. + * @see InlineMessageSeverityType + * Default value is 'info'. + */ + severity?: InlineMessageSeverityType; } -declare class InlineMessage { - $props: InlineMessageProps; - $slots: { - '': VNode[]; +export interface InlineMessageSlots { + /** + * Default custom slot. + */ + default: () => VNode[]; +} + +export declare type InlineMessageEmits = { +} + +declare class InlineMessage extends ClassComponent { } + +declare module '@vue/runtime-core' { + interface GlobalComponents { + InlineMessage: GlobalComponentConstructor } } +/** + * + * InlineMessage component is useful in cases where a single message needs to be displayed related to an element such as forms. It has one property, severity of the message. + * + * Demos: + * + * - [InlineMessage](https://www.primefaces.org/primevue/showcase/#/message) + * + */ export default InlineMessage;