Button d.ts updated
parent
e01d71835f
commit
4b5259f366
|
@ -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 { ButtonHTMLAttributes, VNode } from 'vue';
|
||||||
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
||||||
|
|
||||||
type ButtonIconPosType = 'left' | 'right' | 'top' | 'bottom' | undefined;
|
/**
|
||||||
|
* Defines valid properties in Button component.
|
||||||
|
*/
|
||||||
export interface ButtonProps extends ButtonHTMLAttributes {
|
export interface ButtonProps extends ButtonHTMLAttributes {
|
||||||
/**
|
/**
|
||||||
* Inline style of the button.
|
* Inline style of the button.
|
||||||
|
@ -21,10 +31,10 @@ export interface ButtonProps extends ButtonHTMLAttributes {
|
||||||
*/
|
*/
|
||||||
icon?: string | undefined;
|
icon?: string | undefined;
|
||||||
/**
|
/**
|
||||||
* Position of the icon, valid values are 'left', 'right', 'bottom' and 'top'.
|
* Position of the icon.
|
||||||
* Default value is 'left'.
|
* @defaultValue left
|
||||||
*/
|
*/
|
||||||
iconPos?: ButtonIconPosType;
|
iconPos?: 'left' | 'right' | 'top' | 'bottom' | undefined;
|
||||||
/**
|
/**
|
||||||
* Style class of the icon.
|
* Style class of the icon.
|
||||||
*/
|
*/
|
||||||
|
@ -39,25 +49,43 @@ export interface ButtonProps extends ButtonHTMLAttributes {
|
||||||
badgeClass?: string | undefined;
|
badgeClass?: string | undefined;
|
||||||
/**
|
/**
|
||||||
* Whether the button is in loading state.
|
* Whether the button is in loading state.
|
||||||
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
loading?: boolean | undefined;
|
loading?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Icon to display in loading state.
|
* Icon to display in loading state.
|
||||||
* Default value is 'pi pi-spinner pi-spin'.
|
* @defaultValue pi pi-spinner pi-spin
|
||||||
*/
|
*/
|
||||||
loadingIcon?: string | undefined;
|
loadingIcon?: string | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines valid slots in Button component.
|
||||||
|
*/
|
||||||
export interface ButtonSlots {
|
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.
|
* 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<ButtonProps, ButtonSlots, ButtonEmits> {}
|
/**
|
||||||
|
* **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<ButtonProps, ButtonSlots, ButtonEmits> {}
|
||||||
|
|
||||||
declare module '@vue/runtime-core' {
|
declare module '@vue/runtime-core' {
|
||||||
interface GlobalComponents {
|
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;
|
export default Button;
|
||||||
|
|
Loading…
Reference in New Issue