ant-design-x-vue-next
Version:
Ant Design X for Vue — community continuation aligned with @ant-design/x
38 lines (37 loc) • 753 B
JavaScript
const $ = (a) => ({
animationDuration: a,
animationFillMode: "both"
}), r = (a) => ({
animationDuration: a,
animationFillMode: "both"
}), p = (a, t, i, n, o = !1) => {
const e = o ? "&" : "";
return {
[`
${e}${a}-enter,
${e}${a}-appear
`]: {
...$(n),
animationPlayState: "paused"
},
[`${e}${a}-leave`]: {
...r(n),
animationPlayState: "paused"
},
[`
${e}${a}-enter${a}-enter-active,
${e}${a}-appear${a}-appear-active
`]: {
animationName: t,
animationPlayState: "running"
},
[`${e}${a}-leave${a}-leave-active`]: {
animationName: i,
animationPlayState: "running",
pointerEvents: "none"
}
};
};
export {
p as initMotion
};