UNPKG

web-ui-pack

Version:
8 lines (7 loc) 505 B
/** 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>;