diff --git a/src/components/tag/Tag.d.ts b/src/components/tag/Tag.d.ts index fe7dcc89b..05bb2c403 100644 --- a/src/components/tag/Tag.d.ts +++ b/src/components/tag/Tag.d.ts @@ -1,17 +1,53 @@ import { VNode } from 'vue'; +import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; -interface TagProps { +type TagSeverityType = 'success' | 'info' | 'warning' | 'danger'; + +export interface TagProps { + /** + * Value to display inside the tag. + */ value?: any; - severity?: string; - rounded?: boolean; - icon?: string; + /** + * Severity type of the tag. + * @see TagSeverityType + */ + severity?: TagSeverityType; + /** + * Whether the corners of the tag are rounded. + */ + rounded?: boolean | undefined; + /** + * Icon of the tag to display next to the value. + */ + icon?: string | undefined; } -declare class Tag { - $props: TagProps; - $slots: { - '': VNode[]; +export interface TagSlots { + /** + * Custom content template + */ + default: () => VNode[]; +} + +export declare type TagEmits = { +} + +declare class Tag extends ClassComponent { } + +declare module '@vue/runtime-core' { + interface GlobalComponents { + Tag: GlobalComponentConstructor } } +/** + * + * Tag component is used to categorize content. + * + * Demos: + * + * - [Tag](https://www.primefaces.org/primevue/showcase/#/tag) + * + */ export default Tag;