From 69fa1090410aa54ae1d11d31f2ecf4c45e5f3fb6 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Wed, 1 Dec 2021 15:22:43 +0300 Subject: [PATCH] Fixed #1836 - For Avatar --- src/components/avatar/Avatar.d.ts | 65 +++++++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 8 deletions(-) diff --git a/src/components/avatar/Avatar.d.ts b/src/components/avatar/Avatar.d.ts index e86473407..86eef6a14 100644 --- a/src/components/avatar/Avatar.d.ts +++ b/src/components/avatar/Avatar.d.ts @@ -1,13 +1,62 @@ -interface AvatarProps { - label?: string; - icon?: string; - image?: string; - size?: string; - shape?: string; +import { VNode } from 'vue'; +import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; + +type AvatarSizeType = 'normal' | 'large' | 'xlarge'; + +type AvatarShapeType = 'square' | 'circle'; + +export interface AvatarProps { + /** + * Defines the text to display. + */ + label?: string | undefined; + /** + * Defines the icon to display. + */ + icon?: string | undefined; + /** + * Defines the image to display. + */ + image?: string | undefined; + /** + * Size of the element, valid options are "normal", "large" and "xlarge". + * @see AvatarSizeType + * Default value is 'normal'. + */ + size?: AvatarSizeType; + /** + * Shape of the element, valid options are "square" and "circle". + * @see AvatarShapeType + * Default value is 'square'. + */ + shape?: AvatarShapeType; } -declare class Avatar { - $props: AvatarProps +export interface AvatarSlots { + /** + * Content can easily be customized with the default slot instead of using the built-in modes. + */ + default: () => VNode[]; } +export declare type AvatarEmits = { +} + +declare class Avatar extends ClassComponent { } + +declare module '@vue/runtime-core' { + interface GlobalComponents { + Avatar: GlobalComponentConstructor + } +} + +/** + * + * Avatar represents people using icons, labels and images. + * + * Demos: + * + * - [Avatar](https://www.primefaces.org/primevue/showcase/#/avatar) + * + */ export default Avatar;