primevue-mirror/components/portal/Portal.d.ts

38 lines
1.0 KiB
TypeScript
Raw Normal View History

2022-09-06 12:03:37 +00:00
import { VNode } from 'vue';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
type PortalAppendToType = 'body' | 'self' | string | undefined | HTMLElement;
export interface PortalProps {
/**
* A valid query selector or an HTMLElement to specify where the dialog gets attached. Special keywords are 'body' for document body and 'self' for the element itself.
* @see PortalAppendToType
* Default value is 'body'.
*/
appendTo?: PortalAppendToType;
/**
* If disabled, the Portal feature is eliminated and the content is displayed directly.
2023-03-10 14:00:58 +00:00
* @defaultValue false
2022-09-06 12:03:37 +00:00
*/
disabled?: boolean | undefined;
}
export interface PortalSlots {
/**
* Default content slot.
*/
default: () => VNode[];
}
2022-09-14 11:26:01 +00:00
export declare type PortalEmits = {};
2022-09-06 12:03:37 +00:00
2022-09-14 11:26:01 +00:00
declare class Portal extends ClassComponent<PortalProps, PortalSlots, PortalEmits> {}
2022-09-06 12:03:37 +00:00
declare module '@vue/runtime-core' {
interface GlobalComponents {
2022-09-14 11:26:01 +00:00
Portal: GlobalComponentConstructor<Portal>;
2022-09-06 12:03:37 +00:00
}
}
export default Portal;