primevue-mirror/components/inplace/Inplace.d.ts

79 lines
2.0 KiB
TypeScript
Raw Normal View History

2022-12-08 11:04:25 +00:00
import { HTMLAttributes, ButtonHTMLAttributes, VNode } from 'vue';
2022-09-06 12:03:37 +00:00
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
export interface InplaceProps {
/**
* Displays a button to switch back to display mode.
*/
closable?: boolean | undefined;
/**
* Whether the content is displayed or not.
*/
active?: boolean | undefined;
/**
* When present, it specifies that the element should be disabled.
*/
disabled?: boolean | undefined;
2022-12-08 11:04:25 +00:00
/**
* Icon to display in the close button.
* Default value is 'pi pi-times'.
*/
closeIcon?: string | undefined;
/**
* Uses to pass all properties of the HTMLDivElement to display container.
*/
displayProps?: HTMLAttributes | undefined;
/**
* Uses to pass all properties of the HTMLButtonElement to the close button.
*/
closeButtonProps?: ButtonHTMLAttributes | undefined;
2022-09-06 12:03:37 +00:00
}
export interface InplaceSlots {
/**
* Custom display template.
*/
display: () => VNode[];
/**
* Custom content template.
*/
content: () => VNode[];
}
export declare type InplaceEmits = {
/**
* Emitted when the active changes.
* @param {boolean} value - New value.
*/
'update:active': (value: boolean) => void;
/**
* Callback to invoke when inplace is opened.
* @param {Event} event - Browser event.
*/
2022-09-14 11:26:01 +00:00
open: (event: Event) => void;
2022-09-06 12:03:37 +00:00
/**
* Callback to invoke when inplace is closed.
* @param {Event} event - Browser event.
*/
2022-09-14 11:26:01 +00:00
close: (event: Event) => void;
};
2022-09-06 12:03:37 +00:00
2022-09-14 11:26:01 +00:00
declare class Inplace extends ClassComponent<InplaceProps, InplaceSlots, InplaceEmits> {}
2022-09-06 12:03:37 +00:00
declare module '@vue/runtime-core' {
interface GlobalComponents {
2022-09-14 11:26:01 +00:00
Inplace: GlobalComponentConstructor<Inplace>;
2022-09-06 12:03:37 +00:00
}
}
/**
*
* Inplace provides an easy to do editing and display at the same time where clicking the output displays the actual content.
*
* Demos:
*
2022-09-14 11:26:01 +00:00
* - [Inplace](https://www.primefaces.org/primevue/inplace)
2022-09-06 12:03:37 +00:00
*
*/
export default Inplace;