From c0f4c9c583eda61a8e96406e2fa8cf6519523136 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Wed, 1 Dec 2021 17:18:07 +0300 Subject: [PATCH] Fixed #1836 - For Skeleton --- src/components/skeleton/Skeleton.d.ts | 67 +++++++++++++++++++++++---- 1 file changed, 58 insertions(+), 9 deletions(-) diff --git a/src/components/skeleton/Skeleton.d.ts b/src/components/skeleton/Skeleton.d.ts index 4054e5ee3..6a47c7c7f 100644 --- a/src/components/skeleton/Skeleton.d.ts +++ b/src/components/skeleton/Skeleton.d.ts @@ -1,14 +1,63 @@ -interface SkeletonProps { - shape?: string; - size?: string; - width?: string; - height?: string; - borderRadius?: string; - animation?: string; +import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; + +type SkeletonShapeType = 'rectangle' | 'circle'; + +type SkeletonAnimationType = 'wave' | 'none'; + +export interface SkeletonProps { + /** + * Shape of the element. + * @see SkeletonShapeType + * Default value is 'rectangle'. + */ + shape?: SkeletonShapeType; + /** + * Size of the Circle or Square. + */ + size?: string | undefined; + /** + * Width of the element. + * Default value is '100%'. + */ + width?: string | undefined; + /** + * Height of the element. + * Default value is '1rem'. + */ + height?: string | undefined; + /** + * Border radius of the element, defaults to value from theme. + */ + borderRadius?: string | undefined; + /** + * Type of the animation. + * @see SkeletonAnimationType + * Default value is 'wave'. + */ + animation?: SkeletonAnimationType; } -declare class Skeleton { - $props: SkeletonProps; +export interface SkeletonSlots { } +export declare type SkeletonEmits = { +} + +declare class Skeleton extends ClassComponent { } + +declare module '@vue/runtime-core' { + interface GlobalComponents { + Skeleton: GlobalComponentConstructor + } +} + +/** + * + * Skeleton is a placeholder to display instead of the actual content. + * + * Demos: + * + * - [Skeleton](https://www.primefaces.org/primevue/showcase/#/skeleton) + * + */ export default Skeleton;