docs(web): JSDoc comments for svelte actions (#12963)

* Web: JSDoc comments for Actions

* Remove comment
This commit is contained in:
Spencer Fasulo
2024-09-26 21:41:22 -04:00
committed by GitHub
parent 42ad3e6bb0
commit c86fa81e47
7 changed files with 37 additions and 0 deletions
+6
View File
@@ -6,6 +6,12 @@ interface Options {
onEscape?: () => void;
}
/**
* Calls a function when a click occurs outside of the element, or when the escape key is pressed.
* @param node
* @param options Object containing onOutclick and onEscape functions
* @returns
*/
export function clickOutside(node: HTMLElement, options: Options = {}): ActionReturn {
const { onOutclick, onEscape } = options;