Panel d.ts updated

pull/3689/head
Bahadır Sofuoğlu 2023-02-28 20:39:21 +03:00
parent 48e4639ef0
commit 6a2839fd59
1 changed files with 40 additions and 6 deletions

View File

@ -1,6 +1,19 @@
/**
*
* Panel is a container with the optional content toggle feature.
*
* [Live Demo](https://www.primevue.org/panel/)
*
* @module panel
*
*/
import { ButtonHTMLAttributes, VNode } from 'vue'; import { ButtonHTMLAttributes, VNode } from 'vue';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
/**
* Custom toggle event.
* @see toggle
*/
export interface PanelToggleEvent { export interface PanelToggleEvent {
/** /**
* Browser event. * Browser event.
@ -12,6 +25,9 @@ export interface PanelToggleEvent {
value: boolean; value: boolean;
} }
/**
* Defines valid properties in Panel component.
*/
export interface PanelProps { export interface PanelProps {
/** /**
* Header text of the panel. * Header text of the panel.
@ -31,22 +47,28 @@ export interface PanelProps {
toggleButtonProps?: ButtonHTMLAttributes | undefined; toggleButtonProps?: ButtonHTMLAttributes | undefined;
} }
/**
* Defines valid slots in Panel slots.
*/
export interface PanelSlots { export interface PanelSlots {
/** /**
* Custom content template. * Custom content template.
*/ */
default: () => VNode[]; default(): VNode[];
/** /**
* Custom header template. * Custom header template.
*/ */
header: () => VNode[]; header(): VNode[];
/** /**
* Custom icons template. * Custom icons template.
*/ */
icons: () => VNode[]; icons(): VNode[];
} }
export declare type PanelEmits = { /**
* Defines valid emits in Panel component.
*/
export interface PanelEmits {
/** /**
* Emitted when the collapsed changes. * Emitted when the collapsed changes.
* @param {boolean} value - New value. * @param {boolean} value - New value.
@ -57,9 +79,21 @@ export declare type PanelEmits = {
* @param {PanelToggleEvent} event - Custom toggle event. * @param {PanelToggleEvent} event - Custom toggle event.
*/ */
toggle: (event: PanelToggleEvent) => void; toggle: (event: PanelToggleEvent) => void;
}; }
declare class Panel extends ClassComponent<PanelProps, PanelSlots, PanelEmits> {} /**
* **PrimeVue - Panel**
*
* _Panel is a container with the optional content toggle feature._
*
* [Live Demo](https://www.primevue.org/panel/)
* --- ---
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg)
*
* @group Component
*
*/
export declare class Panel extends ClassComponent<PanelProps, PanelSlots, PanelEmits> {}
declare module '@vue/runtime-core' { declare module '@vue/runtime-core' {
interface GlobalComponents { interface GlobalComponents {