You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
418 B
18 lines
418 B
import animate from './css-animation';
|
|
const getTransitionProps = (transitionName, opt = {}) => {
|
|
const transitionProps = {
|
|
appear: true,
|
|
css: false,
|
|
onEnter: (el, done) => {
|
|
animate(el, `${transitionName}-enter`, done);
|
|
},
|
|
onLeave: (el, done) => {
|
|
animate(el, `${transitionName}-leave`, done);
|
|
},
|
|
...opt,
|
|
};
|
|
return transitionProps;
|
|
};
|
|
|
|
export default getTransitionProps;
|