File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
Expand file tree Collapse file tree 2 files changed +38
-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 (
9+ el : HTMLElement ,
10+ target ?: HTMLElement | string
11+ ) : {
12+ update : ( newTarget : HTMLElement | string ) => Promise < void > ;
13+ destroy : ( ) => void ;
14+ } ;
15+ declare const __propDef : {
16+ props : {
17+ /**
18+ * DOM Element or CSS Selector
19+ * @type { HTMLElement|string }
20+ */ target ?: string | HTMLElement | undefined ;
21+ } ;
22+ events : {
23+ [ evt : string ] : CustomEvent < any > ;
24+ } ;
25+ slots : {
26+ default : { } ;
27+ } ;
28+ } ;
29+ export declare type PortalProps = typeof __propDef . props ;
30+ export declare type PortalEvents = typeof __propDef . events ;
31+ export declare type PortalSlots = typeof __propDef . slots ;
32+ export default class Portal extends SvelteComponentTyped <
33+ PortalProps ,
34+ PortalEvents ,
35+ PortalSlots
36+ > { }
37+ export { } ;
You can’t perform that action at this time.
0 commit comments