From 2b81d6c3065ac4453fe470b51b17d849588cbb64 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Wed, 1 Dec 2021 15:24:45 +0300 Subject: [PATCH] Fixed #1836 - For Badge --- src/components/badge/Badge.d.ts | 51 +++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/src/components/badge/Badge.d.ts b/src/components/badge/Badge.d.ts index 31ea3918d..b040c69a3 100644 --- a/src/components/badge/Badge.d.ts +++ b/src/components/badge/Badge.d.ts @@ -1,11 +1,52 @@ -interface BadgeProps { +import { VNode } from 'vue'; +import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; + +type BadgeSeverityType = 'info' | 'success' | 'warning' | 'danger'; + +type BadgeSizeType = 'large' | 'xlarge' | undefined; + +export interface BadgeProps { + /** + * Value to display inside the badge. + */ value?: any; - severity?: string; - size?: string; + /** + * Severity type of the badge. + * @see BadgeSeverityType + */ + severity?: BadgeSeverityType; + /** + * Size of the badge, valid options are "large" and "xlarge". + * @see BadgeSizeType + */ + size?: BadgeSizeType; } -declare class Badge { - $props: BadgeProps; +export interface BadgeSlots { + /** + * Content can easily be customized with the default slot instead of using the built-in display. + */ + default: () => VNode[]; } +export declare type BadgeEmits = { +} + +declare class Badge extends ClassComponent { } + +declare module '@vue/runtime-core' { + interface GlobalComponents { + Badge: GlobalComponentConstructor + } +} + +/** + * + * Badge is a small status indicator for another element. + * + * Demos: + * + * - [Badge](https://www.primefaces.org/primevue/showcase/#/badge) + * + */ export default Badge;