ant-design-vue/components/_util/getTransitionGroupProps.js

22 lines
784 B
JavaScript
Raw Normal View History

2020-10-09 09:37:04 +00:00
// import animate from './css-animation';
const getTransitionGroupProps = (transitionName, opt = {}) => {
if (process.env.NODE_ENV === 'test') {
return { css: false, ...opt };
}
const transitionProps = {
appear: true,
appearFromClass: `${transitionName}-appear`,
appearActiveClass: `${transitionName}`,
appearToClass: `${transitionName}-appear-active`,
enterFromClass: `${transitionName}-appear ${transitionName}-enter`,
enterActiveClass: `${transitionName}`,
enterToClass: `${transitionName}-appear-active ${transitionName}-enter-active`,
leaveActiveClass: `${transitionName} ${transitionName}-leave`,
leaveToClass: `${transitionName}-leave-active`,
...opt,
};
return transitionProps;
};
export default getTransitionGroupProps;