Type scroll context

This commit is contained in:
Adria Navarro 2025-04-30 16:15:05 +02:00
parent 59fda14c4f
commit 22c25c67a9
3 changed files with 6 additions and 2 deletions

View File

@ -1,9 +1,9 @@
import { ActionMenu } from "./types"
import { ModalContext } from "./types"
import { ActionMenu, ModalContext, ScrollContext } from "./types"
declare module "svelte" {
export function getContext(key: "actionMenu"): ActionMenu | undefined
export function getContext(key: "bbui-modal"): ModalContext
export function getContext(key: "scroll"): ScrollContext
}
export const Modal = "bbui-modal"

View File

@ -1,3 +1,4 @@
export * from "./actionMenu"
export * from "./envDropdown"
export * from "./modalContext"
export * from "./scrollContext"

View File

@ -0,0 +1,3 @@
export interface ScrollContext {
scrollTo: (bounds: DOMRect) => void
}