@ebay/ebayui-core
Version:
Collection of core eBay components; considered to be the building blocks for all composite structures, pages & apps.
24 lines (23 loc) • 864 B
TypeScript
/**
* Applies a primer `-init` class before starting a transition
* to make transitioning properties that are not animatable easier.
*
* **Order**
* 1. Add class: "$className-init"
* 2. Wait one frame.
* 3. Remove class "$className-init".
* 4. Add class "$className".
* 5. Wait for animation to finish.
* 6. Remove class "$className".
*
* @param {HTMLElement} options.el The root element that contains the animation.
* @param {string} options.className The base className to use for the transition.
* @param {Element[]} options.waitFor Elements that will transition and should be waited for.
* @param {Function} cb A callback called after the transition as ended.
*/
declare const _default: ({ el, className, waitFor, }: {
el: HTMLElement;
className: string;
waitFor: Element[];
}, cb: Function) => () => void;
export default _default;