UNPKG

@nativescript-community/ui-popover

Version:
19 lines (18 loc) 921 B
import { View, ViewBase } from '@nativescript/core'; import { NativeViewElementNode } from 'svelte-native/dom'; import type { PopoverOptions as IPopoverOptions } from '..'; type ViewSpec<T> = typeof SvelteComponent<T>; export interface PopoverOptions<T> extends Omit<IPopoverOptions, 'anchor'> { view: ViewSpec<T>; anchor?: NativeViewElementNode<View> | View; props?: T; } export interface ComponentInstanceInfo<T extends ViewBase = View, U = SvelteComponent> { element: NativeViewElementNode<T>; viewInstance: U; } export declare function resolveComponentElement<T = any>(viewSpec: ViewSpec<T>, props?: any): ComponentInstanceInfo; export declare function showPopover<T, U>(modalOptions: PopoverOptions<U>, onCreated?: (data: ComponentInstanceInfo) => void): Promise<T>; export declare function closePopover(result?: any): Promise<any>; export declare function isPopoverOpened(): boolean; export {};