fix types
This commit is contained in:
parent
86249e0e1d
commit
6823401c18
|
@ -1,8 +1,23 @@
|
||||||
import { Context } from "."
|
|
||||||
|
|
||||||
declare module "svelte" {
|
declare module "svelte" {
|
||||||
export function getContext(key: Context.Modal): {
|
export function getContext(key: Context.Modal): {
|
||||||
hide: () => void
|
hide: () => void
|
||||||
cancel: () => void
|
cancel: () => void
|
||||||
}
|
}
|
||||||
|
export function getContext(key: Context.Popover): {
|
||||||
|
show: () => void
|
||||||
|
hide: () => void
|
||||||
|
}
|
||||||
|
export function getContext(key: "actionMenu"): {
|
||||||
|
hideAll: () => void
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
Modal: "bbui-modal",
|
||||||
|
PopoverRoot: "bbui-popover-root",
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export namespace Context {
|
||||||
|
type Modal = "bbui-modal"
|
||||||
|
type PopoverRoot = "bbui-popover-root"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
export default {
|
|
||||||
Modal: "bbui-modal",
|
|
||||||
PopoverRoot: "bbui-popover-root",
|
|
||||||
}
|
|
Loading…
Reference in New Issue