@nativescript-community/ui-popover
Version:
Popover plugn
35 lines (34 loc) • 1.1 kB
TypeScript
import { Component } from 'nativescript-vue';
import { Color, View } from '@nativescript/core';
import { HorizontalPosition, VerticalPosition } from '..';
declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
$showPopover(component: any, options: VuePopoverOptions): Promise<void>;
$closePopover(result?: any): any;
}
}
interface VuePopoverOptions {
anchor: View;
props?: any;
on?: Record<string, (...args: any[]) => any>;
vertPos?: VerticalPosition;
horizPos?: HorizontalPosition;
x?: number;
y?: number;
fitInScreen?: boolean;
outsideTouchable?: boolean;
transparent?: boolean;
backgroundColor?: Color;
canOverlapSourceViewRect?: boolean;
context?: any;
hideArrow?: boolean;
onDismiss?: Function;
}
declare const PopoverPlugin: {
install(app: any): void;
};
declare const usePopover: () => {
showPopover: (component: Component, options: VuePopoverOptions) => Promise<void>;
closePopover: (result?: any) => Promise<any>;
};
export { PopoverPlugin, usePopover, VuePopoverOptions };