Fixed #1836 - For Avatar

pull/1846/head
mertsincan 2021-12-01 15:22:43 +03:00
parent 3adb3e7266
commit 69fa109041
1 changed files with 57 additions and 8 deletions

View File

@ -1,13 +1,62 @@
interface AvatarProps { import { VNode } from 'vue';
label?: string; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
icon?: string;
image?: string; type AvatarSizeType = 'normal' | 'large' | 'xlarge';
size?: string;
shape?: string; 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 { export interface AvatarSlots {
$props: AvatarProps /**
* 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<AvatarProps, AvatarSlots, AvatarEmits> { }
declare module '@vue/runtime-core' {
interface GlobalComponents {
Avatar: GlobalComponentConstructor<Avatar>
}
}
/**
*
* Avatar represents people using icons, labels and images.
*
* Demos:
*
* - [Avatar](https://www.primefaces.org/primevue/showcase/#/avatar)
*
*/
export default Avatar; export default Avatar;