File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 55 "main" : " src/main.cjs.js" ,
66 "module" : " src/main.es.js" ,
77 "svelte" : " src/Portal.svelte" ,
8+ "types" : " src/Portal.svelte.d.ts" ,
89 "scripts" : {
910 "test" : " jest test" ,
1011 "test:watch" : " npm run test -- --watch" ,
Original file line number Diff line number Diff line change 1+ import { SvelteComponentTyped } from "svelte" ;
2+ /**
3+ * Usage: <div use:portal={'css selector'}> or <div use:portal={document.body}>
4+ *
5+ * @param {HTMLElement } el
6+ * @param {HTMLElement|string } target DOM Element or CSS Selector
7+ */
8+ export declare function portal ( el : HTMLElement , target ?: HTMLElement | string ) : {
9+ update : ( newTarget : HTMLElement | string ) => Promise < void > ;
10+ destroy : ( ) => void ;
11+ } ;
12+ declare const __propDef : {
13+ props : {
14+ /**
15+ * DOM Element or CSS Selector
16+ * @type { HTMLElement|string }
17+ */ target ?: string | HTMLElement | undefined ;
18+ } ;
19+ events : {
20+ [ evt : string ] : CustomEvent < any > ;
21+ } ;
22+ slots : {
23+ default : { } ;
24+ } ;
25+ } ;
26+ export declare type PortalProps = typeof __propDef . props ;
27+ export declare type PortalEvents = typeof __propDef . events ;
28+ export declare type PortalSlots = typeof __propDef . slots ;
29+ export default class Portal extends SvelteComponentTyped < PortalProps , PortalEvents , PortalSlots > {
30+ }
31+ export { } ;
You can’t perform that action at this time.
0 commit comments