@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) • 874 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 {string[]} options.transitionList A list of transition properties to listen for.
* @param {Function} cb A callback called after the transition as ended.
*/
declare const _default: ({ el, className, transitionList, }: {
el: HTMLElement;
className: string;
transitionList: string[];
}, cb: Function) => () => void;
export default _default;