UNPKG

pages-cook

Version:

web-portals

15 lines (13 loc) 609 B
import { TransformAnimateEvent } from '../../../types' export default (type: number) => { return (e: TransformAnimateEvent) => { e.in.origin(type === 0 ? e.attach : e.origin).ease('ease-out-expo').duration(0).to(0, 0, 0).scale(type === 0 ? 2.5 : 0).end(() => { e.out.origin(type === 1 ? e.attach : e.origin).ease('ease-in-expo').duration(0).to(0, 0, 0).opacity(1).scale(1).end(() => { e.in.duration(767).to(0, 0, 0).scale(1).end() e.out.duration(400).opacity(type === 0 ? 0 : 1).scale(type === 0 ? 0 : 2.5).end(() => { e.callback(false) }) }) }) } }