portal-vue
Version:
> A Portal Component for Vuejs, to render DOM outside of a component, anywhere in the document.
64 lines (54 loc) • 1.06 kB
text/typescript
import {
default as Vue,
VNode,
PropOptions,
VueConstructor,
ComponentOptions,
} from 'vue'
export interface StringBoolMap {
[key: string]: boolean
}
export interface VMRegister {
[key: string]: Readonly<Array<Vue>>
}
export interface Transports {
[key: string]: Transport[]
}
export interface TransportInput {
to: string
from: string
order?: number
passengers: Array<VNode | Function>
}
export interface Transport {
to: string
from: string
order: number
passengers: ReadonlyArray<VNode | Function>
}
export interface TransportVector {
to: string
from?: string
}
export type PropWithComponent =
| VueConstructor<Vue>
| ComponentOptions<Vue>
| string
export type PortalProps = Partial<{
disabled: boolean
name: string
order: number
slim: boolean
slotProps: object
tag: string
to: string
}>
export type PortalTargetProps = Partial<{
multiple: boolean
name: string
slim: boolean
slotProps: object
tag: string
transition: PropOptions<PropWithComponent>
transitionGroup: boolean
}>