UNPKG

@schedule-x/svelte

Version:

![schedule-x](https://schedule-x.s3.eu-west-1.amazonaws.com/schedule-x-logo.png)

40 lines (39 loc) 1.39 kB
/** * Usage: <div use:portal={'css selector'}> or <div use:portal={document.body}> * * @param el - The element to move * @param target - DOM element or CSS selector */ export declare function portal(el: HTMLElement, target?: HTMLElement | string): { update: (newTarget: string | HTMLElement) => Promise<void>; destroy: () => void; }; interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> { new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & { $$bindings?: Bindings; } & Exports; (internal: unknown, props: Props & { $$events?: Events; $$slots?: Slots; }): Exports & { $set?: any; $on?: any; }; z_$$bindings?: Bindings; } type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends { default: any; } ? Props extends Record<string, never> ? any : { children?: any; } : {}); declare const Portal: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{ target?: HTMLElement | string; }, { default: {}; }>, { [evt: string]: CustomEvent<any>; }, { default: {}; }, {}, string>; type Portal = InstanceType<typeof Portal>; export default Portal;