From fdb53fffebdf572758b17deb9d87efbed57f7aba Mon Sep 17 00:00:00 2001 From: mertsincan Date: Wed, 1 Mar 2023 11:19:19 +0000 Subject: [PATCH] ToggleButton d.ts updated --- components/togglebutton/ToggleButton.d.ts | 64 +++++++++++++++-------- 1 file changed, 42 insertions(+), 22 deletions(-) diff --git a/components/togglebutton/ToggleButton.d.ts b/components/togglebutton/ToggleButton.d.ts index ddc94fd4b..2c3c0e47c 100755 --- a/components/togglebutton/ToggleButton.d.ts +++ b/components/togglebutton/ToggleButton.d.ts @@ -1,11 +1,22 @@ +/** + * + * ToggleButton is used to select a boolean value using a button. + * + * [Live Demo](https://www.primevue.org/togglebutton/) + * + * @module togglebutton + * + */ import { InputHTMLAttributes } from 'vue'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; -type ToggleButtonType = 'left' | 'right' | undefined; - +/** + * Defines valid properties in ToggleButton component. + */ export interface ToggleButtonProps { /** * Value of the component. + * @defaultValue false */ modelValue?: boolean | undefined; /** @@ -18,22 +29,22 @@ export interface ToggleButtonProps { offIcon?: string | undefined; /** * Label for the on state. - * Default value is 'yes'. + * @defaultValue yes */ onLabel?: string | undefined; /** * Label for the off state. - * Default value is 'no'. + * @defaultValue no */ offLabel?: string | undefined; /** * Position of the icon. - * @see ToggleButtonType - * Default value is 'left'. + * @defaultValue left */ - iconPos?: ToggleButtonType; + iconPos?: 'left' | 'right' | undefined; /** * When present, it specifies that the element should be disabled. + * @defaultValue false */ disabled?: boolean | undefined; /** @@ -66,31 +77,49 @@ export interface ToggleButtonProps { 'aria-label'?: string | undefined; } +/** + * Defines valid slots in ToggleButton component. + */ export interface ToggleButtonSlots {} -export declare type ToggleButtonEmits = { +/** + * Defines valid emits in ToggleButton component. + */ +export interface ToggleButtonEmits { /** * Emitted when the value changes. * @param {boolean} value - New value. */ - 'update:modelValue': (value: boolean) => void; + 'update:modelValue'(value: boolean): void; /** * Callback to invoke on value change. * @param {Event} event - Browser event. */ - change: (event: Event) => void; + change(event: Event): void; /** * Callback to invoke when the component receives focus. * @param {Event} event - Browser event. */ - focus: (event: Event) => void; + focus(event: Event): void; /** * Callback to invoke when the component loses focus. * @param {Event} event - Browser event. */ - blur: (event: Event) => void; -}; + blur(event: Event): void; +} +/** + * **PrimeVue - ToggleButton** + * + * _ToggleButton is used to select a boolean value using a button._ + * + * [Live Demo](https://www.primevue.org/togglebutton/) + * --- --- + * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg) + * + * @group Component + * + */ declare class ToggleButton extends ClassComponent {} declare module '@vue/runtime-core' { @@ -99,13 +128,4 @@ declare module '@vue/runtime-core' { } } -/** - * - * ToggleButton is used to select a boolean value using a button. - * - * Demos: - * - * - [ToggleButton](https://www.primefaces.org/primevue/togglebutton) - * - */ export default ToggleButton;