web-ui-pack
Version:
Web package with UI elements
8 lines (7 loc) • 505 B
TypeScript
/** Animate (show/hide) element as dropdown via scale and counter-scale for children
* @param ms animation time
* @returns Promise<isFinished> that resolved by animation end;
* Rules
* * To define direction set attribute to element position="top" (or "bottom", "left", "right")
* * Before call it again on the same element don't forget to call stop(false) to cancel prev animation */
export default function animateDropdown(el: HTMLElement, ms: number, isHide?: boolean): WUP.PromiseCancel<boolean>;