From 4b5259f3662a7c34e1ff87c8fe0fb634e7b33b00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Wed, 1 Mar 2023 11:50:01 +0300 Subject: [PATCH] Button d.ts updated --- components/button/Button.d.ts | 55 +++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/components/button/Button.d.ts b/components/button/Button.d.ts index 00d3b5254..2acfc71b1 100755 --- a/components/button/Button.d.ts +++ b/components/button/Button.d.ts @@ -1,8 +1,18 @@ +/** + * + * Button is an extension to standard button element with icons and theming. + * + * [Live Demo](https://www.primevue.org/button/) + * + * @module button + * + */ import { ButtonHTMLAttributes, VNode } from 'vue'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; -type ButtonIconPosType = 'left' | 'right' | 'top' | 'bottom' | undefined; - +/** + * Defines valid properties in Button component. + */ export interface ButtonProps extends ButtonHTMLAttributes { /** * Inline style of the button. @@ -21,10 +31,10 @@ export interface ButtonProps extends ButtonHTMLAttributes { */ icon?: string | undefined; /** - * Position of the icon, valid values are 'left', 'right', 'bottom' and 'top'. - * Default value is 'left'. + * Position of the icon. + * @defaultValue left */ - iconPos?: ButtonIconPosType; + iconPos?: 'left' | 'right' | 'top' | 'bottom' | undefined; /** * Style class of the icon. */ @@ -39,25 +49,43 @@ export interface ButtonProps extends ButtonHTMLAttributes { badgeClass?: string | undefined; /** * Whether the button is in loading state. + * @defaultValue false */ loading?: boolean | undefined; /** * Icon to display in loading state. - * Default value is 'pi pi-spinner pi-spin'. + * @defaultValue pi pi-spinner pi-spin */ loadingIcon?: string | undefined; } +/** + * Defines valid slots in Button component. + */ export interface ButtonSlots { /** * Custom content such as icons, images and text can be placed inside the button via the default slot. Note that when slot is used, label, icon and badge properties are not included. */ - default: () => VNode[]; + default(): VNode[]; } -export declare type ButtonEmits = {}; +/** + * Defines valid emits in Button component. + */ +export interface ButtonEmits {} -declare class Button extends ClassComponent {} +/** + * **PrimeVue - Button** + * + * _Button is an extension to standard button element with icons and theming._ + * + * [Live Demo](https://www.primevue.org/button/) + * --- --- + * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png) + * + * @group Component + */ +export declare class Button extends ClassComponent {} declare module '@vue/runtime-core' { interface GlobalComponents { @@ -65,13 +93,4 @@ declare module '@vue/runtime-core' { } } -/** - * - * Button is an extension to standard button element with icons and theming. - * - * Demos: - * - * - [Button](https://www.primefaces.org/primevue/button) - * - */ export default Button;